Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HelloWorld Cs sample doesn't build in VS 2019 Community #57

Closed
WheretIB opened this issue Apr 24, 2020 · 5 comments
Closed

HelloWorld Cs sample doesn't build in VS 2019 Community #57

WheretIB opened this issue Apr 24, 2020 · 5 comments

Comments

@WheretIB
Copy link

WheretIB commented Apr 24, 2020

HelloWorld project doesn't have any Visual Studio SDK references, so it fails to find them:

1>Build started 24-Apr-20 9:50:28.
1>GenerateTargetFrameworkMonikerAttribute:
1>Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
1>CoreCompile:
1>  L:\dev\VS2019\MSBuild\Current\Bin\Roslyn\csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /errorendlocation /preferreduilang:en-US /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\HelloWorld.dll /ruleset:"L:\dev\VS2019\Team Tools\Static Analysis Tools\\Rule Sets\AllRules.ruleset" /subsystemversion:6.00 /target:library /utf8output /langversion:7.3 HelloWorldDataItem.cs _HelloWorldService.cs Properties\AssemblyInfo.cs "C:\Users\User\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs"
1>  Using shared compilation with compiler from directory: L:\dev\VS2019\MSBuild\Current\Bin\Roslyn
1>L:\dev\vs_extensions\ConcordExtensibilitySamples\HelloWorld\Cs\dll\HelloWorldDataItem.cs(4,17,4,29): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
1>L:\dev\vs_extensions\ConcordExtensibilitySamples\HelloWorld\Cs\dll\HelloWorldDataItem.cs(5,17,5,29): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
1>L:\dev\vs_extensions\ConcordExtensibilitySamples\HelloWorld\Cs\dll\_HelloWorldService.cs(4,17,4,29): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
1>L:\dev\vs_extensions\ConcordExtensibilitySamples\HelloWorld\Cs\dll\_HelloWorldService.cs(5,17,5,29): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
1>L:\dev\vs_extensions\ConcordExtensibilitySamples\HelloWorld\Cs\dll\HelloWorldDataItem.cs(31,40,31,51): error CS0246: The type or namespace name 'DkmDataItem' could not be found (are you missing a using directive or an assembly reference?)
1>L:\dev\vs_extensions\ConcordExtensibilitySamples\HelloWorld\Cs\dll\_HelloWorldService.cs(16,38,16,57): error CS0246: The type or namespace name 'IDkmCallStackFilter' could not be found (are you missing a using directive or an assembly reference?)
1>L:\dev\vs_extensions\ConcordExtensibilitySamples\HelloWorld\Cs\dll\_HelloWorldService.cs(20,29,20,48): error CS0246: The type or namespace name 'IDkmCallStackFilter' could not be found (are you missing a using directive or an assembly reference?)
1>L:\dev\vs_extensions\ConcordExtensibilitySamples\HelloWorld\Cs\dll\_HelloWorldService.cs(20,65,20,80): error CS0246: The type or namespace name 'DkmStackContext' could not be found (are you missing a using directive or an assembly reference?)
1>L:\dev\vs_extensions\ConcordExtensibilitySamples\HelloWorld\Cs\dll\_HelloWorldService.cs(20,95,20,112): error CS0246: The type or namespace name 'DkmStackWalkFrame' could not be found (are you missing a using directive or an assembly reference?)
1>L:\dev\vs_extensions\ConcordExtensibilitySamples\HelloWorld\Cs\dll\_HelloWorldService.cs(20,9,20,26): error CS0246: The type or namespace name 'DkmStackWalkFrame' could not be found (are you missing a using directive or an assembly reference?)
1>L:\dev\vs_extensions\ConcordExtensibilitySamples\HelloWorld\Cs\dll\_HelloWorldService.cs(20,29,20,48): error CS0538: 'IDkmCallStackFilter' in explicit interface declaration is not an interface
1>L:\dev\vs_extensions\ConcordExtensibilitySamples\HelloWorld\Cs\dll\HelloWorldDataItem.cs(51,53,51,68): error CS0246: The type or namespace name 'DkmStackContext' could not be found (are you missing a using directive or an assembly reference?)
1>L:\dev\vs_extensions\ConcordExtensibilitySamples\HelloWorld\Cs\dll\HelloWorldDataItem.cs(69,61,69,76): error CS0246: The type or namespace name 'DkmStackContext' could not be found (are you missing a using directive or an assembly reference?)
1>
1>Build FAILED.

You have to add a reference to
<Reference Include="Microsoft.VisualStudio.Debugger.Engine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />

@gregg-miskelly
Copy link
Member

That shouldn't be needed, as the project has a PackageReference to Microsoft.VisualStudio.Debugger.Engine. If you crank up the build verbosity, can you see the package being checked?

    <PackageReference Include="Microsoft.VisualStudio.Debugger.Engine" Version="$(ConcordPackageVersion)">
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>

@WheretIB
Copy link
Author

I see there's a reference in the csproj file, but it is not displayed in Solution explorer.

Solution Explorer

I can't see any mention of that package in Detailed MSBuild log file: Build Log

@WheretIB
Copy link
Author

If I open NuGet package manager, I can see two packages listed and installed but the project still does not build.
NuGet Package Manager

And 'Restore NuGet Packages' menu option doesn't help.

@WheretIB
Copy link
Author

I wanted to reinstall the package, and as soon as I removed the Debugger package, the VSDConfigTool got restored.
NuGet Package Manager 2

@WheretIB
Copy link
Author

Looks like I was missing these two checkboxes in Visual Studio settings:
NuGet Settings

After turning them both on, packages are restored in a clean git clone and project builds without an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants