microsoft / VSSDK-Extensibility-Samples

Samples for building your own Visual Studio extensions
http://aka.ms/extendvs
MIT License
1.21k stars 451 forks source link

LanguageServerProtocol does not compile correctly. #216

Open pbrubaker opened 3 years ago

pbrubaker commented 3 years ago

Installed products

Description

LanguageServerProtocol does not compile correctly.

Steps to recreate

  1. Load LanguageServerProtocol/MockLanguageExtension.sln
  2. Compile

Current behavior

3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2084,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.CoreUtility, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 3>C:\Users\PBRUBAKE\Downloads\VSSDK-Extensibility-Samples-master\LanguageServerProtocol\MockLanguageExtension\FooContentTypeDefinition.cs(12,25,12,46): error CS0246: The type or namespace name 'ContentTypeDefinition' could not be found (are you missing a using directive or an assembly reference?) 3>C:\Users\PBRUBAKE\Downloads\VSSDK-Extensibility-Samples-master\LanguageServerProtocol\MockLanguageExtension\FooContentTypeDefinition.cs(18,25,18,61): error CS0246: The type or namespace name 'FileExtensionToContentTypeDefinition' could not be found (are you missing a using directive or an assembly reference?) 3>C:\Users\PBRUBAKE\Downloads\VSSDK-Extensibility-Samples-master\LanguageServerProtocol\MockLanguageExtension\FooContentTypeDefinition.cs(10,10,10,14): error CS0246: The type or namespace name 'NameAttribute' could not be found (are you missing a using directive or an assembly reference?) 3>C:\Users\PBRUBAKE\Downloads\VSSDK-Extensibility-Samples-master\LanguageServerProtocol\MockLanguageExtension\FooContentTypeDefinition.cs(10,10,10,14): error CS0246: The type or namespace name 'Name' could not be found (are you missing a using directive or an assembly reference?)

Expected behavior

It should compile correcly.

Also this example is in dire need of updating.

feilongsword commented 3 years ago

I got the same problem too. Do you fix it?

pbrubaker commented 3 years ago

This should be fixed - it was updated but it looks like this bug wasn't closed. Have you pulled down the latest code from github?

feilongsword commented 3 years ago

This should be fixed - it was updated but it looks like this bug wasn't closed. Have you pulled down the latest code from github?

No, I replaced VS2019 with VS2017 and this problem didn't appear again. It seems like that some referrences are missing in the latest update of VS2019