I have cloned the code for autorest.csharp and it's submodules However test project has a missing dependency
The build error is
Error CS0234 The type or namespace name 'Modeler'
does not exist in the namespace 'AutoRest'
(are you missing an assembly reference?) autorest.csharp.test
However the solution file contains the following
<ItemGroup>
<Reference Include="autorest.modeler">
<HintPath>$(SolutionDir)\node_modules\@microsoft.azure\autorest.modeler\src\bin\netcoreapp2.0\autorest.modeler.dll</HintPath>
<!-- <HintPath>C:\work\oneautorest\autorest.modeler\src\bin\netcoreapp2.0\autorest.modeler.dll</HintPath> -->
</Reference>
<ProjectReference Include="$(SolutionDir)src/autorest.csharp.csproj" />
</ItemGroup>
How do include the code ( or if necessary the .dll) for the missing dependency?
I can see the source for the modeler is at this repository but how should I be accessing it?
@microsoft.azure/autorest.modeler
is declared in thepackage.json devDependencies
section.That devDependencies section is described as:
So in your case, try:
For Windows:
(not the lack of space between
development
and&&
: that is important)In order to get and install development dependencies as well as the main production project.
Or, as documented in "
npm install
won't install devDependencies":Also Check if npm config production value is set to true. If this value is true, it will skip over the dev dependencies.
Also: Run
npm config get production
, make sure it is set tofalse
:If
npm install --only=dev
/npm rebuild
don't work, you might need to deletenode_modules
andpackage-lock.json
and runnpm install
again