PistonDevelopers / VisualRust

Visual Studio extension for Rust
MIT License
701 stars 73 forks source link

Multiple Issues opening and building the solution in VS2017 #294

Open jason-watkins opened 6 years ago

jason-watkins commented 6 years ago

I have a fresh install of Visual Studio Enterprise 2017 with the ".NET desktop development" and "Visual Studio extension development" workloads installed, along with "WiX Toolset v3.11" and the associated VS 2017 extension.

After cloning the repository, upon opening the solution "MICore" and "MIDebugEngine" projects fail to load because their project files do not exist. The "VisualRust.2015", "VisualRust.2017", and "VisualRust.Templates" projects all fail to load with the message

The imported project "$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" was not found. Also, tried to find "$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" in the fallback search path(s) for $(VSToolsPath) - "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0" . These search paths are defined in "C:\Users\jason\AppData\Local\Microsoft\VisualStudio\15.0_977bb56b\devenv.exe.config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. S:\Code\VisualRust\src\VisualRust.Templates\VisualRust.Templates.csproj

Trying to build the Release target also results in a number of seamingly unrelated errors. The following is the build output:

Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
1>------ Build started: Project: VisualRust.Shared, Configuration: Release Any CPU ------
2>------ Build started: Project: VisualRust.Core, Configuration: Release Any CPU ------
3>------ Build started: Project: RustLexer, Configuration: Release Any CPU ------
4>------ Build started: Project: VisualRust.Setup.FileAssociation.2017, Configuration: Release x86 ------
4>  C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe -d"DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\\" -dSolutionDir=S:\Code\VisualRust\ -dSolutionExt=.sln -dSolutionFileName=VisualRust.sln -dSolutionName=VisualRust -dSolutionPath=S:\Code\VisualRust\VisualRust.sln -dConfiguration=Release -dOutDir=S:\Code\VisualRust\build\..\bin\VisualRust.Setup.FileAssociation.2017\Release\ -dPlatform=x86 -dProjectDir=S:\Code\VisualRust\installer\VisualRust.Setup.FileAssociation\ -dProjectExt=.wixproj -dProjectFileName=VisualRust.Setup.FileAssociation.2017.wixproj -dProjectName=VisualRust.Setup.FileAssociation.2017 -dProjectPath=S:\Code\VisualRust\installer\VisualRust.Setup.FileAssociation\VisualRust.Setup.FileAssociation.2017.wixproj -dTargetDir=S:\Code\VisualRust\bin\VisualRust.Setup.FileAssociation.2017\Release\ -dTargetExt=.msi -dTargetFileName=VisualRust.Setup.FileAssociation.2017.msi -dTargetName=VisualRust.Setup.FileAssociation.2017 -dTargetPath=S:\Code\VisualRust\bin\VisualRust.Setup.FileAssociation.2017\Release\VisualRust.Setup.FileAssociation.2017.msi -out S:\Code\VisualRust\build\..\obj\VisualRust.Setup.FileAssociation.2017\\Release\ -arch x86 Product.2017.wxs
4>  C:\Program Files (x86)\WiX Toolset v3.11\bin\Light.exe -out S:\Code\VisualRust\bin\VisualRust.Setup.FileAssociation.2017\Release\VisualRust.Setup.FileAssociation.2017.msi -pdbout S:\Code\VisualRust\bin\VisualRust.Setup.FileAssociation.2017\Release\VisualRust.Setup.FileAssociation.2017.wixpdb -cultures:null -contentsfile S:\Code\VisualRust\build\..\obj\VisualRust.Setup.FileAssociation.2017\\Release\VisualRust.Setup.FileAssociation.2017.wixproj.BindContentsFileListnull.txt -outputsfile S:\Code\VisualRust\build\..\obj\VisualRust.Setup.FileAssociation.2017\\Release\VisualRust.Setup.FileAssociation.2017.wixproj.BindOutputsFileListnull.txt -builtoutputsfile S:\Code\VisualRust\build\..\obj\VisualRust.Setup.FileAssociation.2017\\Release\VisualRust.Setup.FileAssociation.2017.wixproj.BindBuiltOutputsFileListnull.txt -wixprojectfile S:\Code\VisualRust\installer\VisualRust.Setup.FileAssociation\VisualRust.Setup.FileAssociation.2017.wixproj S:\Code\VisualRust\build\..\obj\VisualRust.Setup.FileAssociation.2017\\Release\Product.2017.wixobj
2>S:\Code\VisualRust\build\StrongNamer.0.0.5\StrongNamer.targets(19,5): error MSB4062: The "StrongNamer.AddStrongName" task could not be loaded from the assembly S:\Code\VisualRust\build\StrongNamer.0.0.5\StrongNamer.dll. Could not load file or assembly 'file:///S:\Code\VisualRust\build\StrongNamer.0.0.5\StrongNamer.dll' or one of its dependencies. The module was expected to contain an assembly manifest. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
5>------ Build started: Project: VisualRust.ProjectSystem.FileSystemMirroring.2015, Configuration: Release Any CPU ------
5>S:\Code\VisualRust\build\StrongNamer.0.0.5\StrongNamer.targets(19,5): error MSB4062: The "StrongNamer.AddStrongName" task could not be loaded from the assembly S:\Code\VisualRust\build\StrongNamer.0.0.5\StrongNamer.dll. Could not load file or assembly 'file:///S:\Code\VisualRust\build\StrongNamer.0.0.5\StrongNamer.dll' or one of its dependencies. The module was expected to contain an assembly manifest. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
6>------ Build started: Project: VisualRust.ProjectSystem.FileSystemMirroring.2017, Configuration: Release Any CPU ------
6>S:\Code\VisualRust\build\StrongNamer.0.0.5\StrongNamer.targets(19,5): error MSB4062: The "StrongNamer.AddStrongName" task could not be loaded from the assembly S:\Code\VisualRust\build\StrongNamer.0.0.5\StrongNamer.dll. Could not load file or assembly 'file:///S:\Code\VisualRust\build\StrongNamer.0.0.5\StrongNamer.dll' or one of its dependencies. The module was expected to contain an assembly manifest. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
4>C:\Users\jason\AppData\Local\Temp\wzbdelec\VisualRust.Setup.FileAssociation.2017.msi(0,0): warning LGHT1076: ICE71: The Media table has no entries.
4>  VisualRust.Setup.FileAssociation.2017 -> S:\Code\VisualRust\bin\VisualRust.Setup.FileAssociation.2017\Release\VisualRust.Setup.FileAssociation.2017.msi
7>------ Build started: Project: VisualRust.Setup.FileAssociation.2015, Configuration: Release x86 ------
7>  C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe -d"DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\\" -dSolutionDir=S:\Code\VisualRust\ -dSolutionExt=.sln -dSolutionFileName=VisualRust.sln -dSolutionName=VisualRust -dSolutionPath=S:\Code\VisualRust\VisualRust.sln -dConfiguration=Release -dOutDir=S:\Code\VisualRust\build\..\bin\VisualRust.Setup.FileAssociation.2015\Release\ -dPlatform=x86 -dProjectDir=S:\Code\VisualRust\installer\VisualRust.Setup.FileAssociation\ -dProjectExt=.wixproj -dProjectFileName=VisualRust.Setup.FileAssociation.2015.wixproj -dProjectName=VisualRust.Setup.FileAssociation.2015 -dProjectPath=S:\Code\VisualRust\installer\VisualRust.Setup.FileAssociation\VisualRust.Setup.FileAssociation.2015.wixproj -dTargetDir=S:\Code\VisualRust\bin\VisualRust.Setup.FileAssociation.2015\Release\ -dTargetExt=.msi -dTargetFileName=VisualRust.Setup.FileAssociation.2015.msi -dTargetName=VisualRust.Setup.FileAssociation.2015 -dTargetPath=S:\Code\VisualRust\bin\VisualRust.Setup.FileAssociation.2015\Release\VisualRust.Setup.FileAssociation.2015.msi -out S:\Code\VisualRust\build\..\obj\VisualRust.Setup.FileAssociation.2015\\Release\ -arch x86 Product.2015.wxs
7>  C:\Program Files (x86)\WiX Toolset v3.11\bin\Light.exe -out S:\Code\VisualRust\bin\VisualRust.Setup.FileAssociation.2015\Release\VisualRust.Setup.FileAssociation.2015.msi -pdbout S:\Code\VisualRust\bin\VisualRust.Setup.FileAssociation.2015\Release\VisualRust.Setup.FileAssociation.2015.wixpdb -cultures:null -contentsfile S:\Code\VisualRust\build\..\obj\VisualRust.Setup.FileAssociation.2015\\Release\VisualRust.Setup.FileAssociation.2015.wixproj.BindContentsFileListnull.txt -outputsfile S:\Code\VisualRust\build\..\obj\VisualRust.Setup.FileAssociation.2015\\Release\VisualRust.Setup.FileAssociation.2015.wixproj.BindOutputsFileListnull.txt -builtoutputsfile S:\Code\VisualRust\build\..\obj\VisualRust.Setup.FileAssociation.2015\\Release\VisualRust.Setup.FileAssociation.2015.wixproj.BindBuiltOutputsFileListnull.txt -wixprojectfile S:\Code\VisualRust\installer\VisualRust.Setup.FileAssociation\VisualRust.Setup.FileAssociation.2015.wixproj S:\Code\VisualRust\build\..\obj\VisualRust.Setup.FileAssociation.2015\\Release\Product.2015.wixobj
3>  RustLexer -> S:\Code\VisualRust\bin\RustLexer\Release\RustLexer.dll
1>  VisualRust.Shared -> S:\Code\VisualRust\bin\VisualRust.Shared\Release\VisualRust.Shared.dll
8>------ Build started: Project: VisualRust.Build, Configuration: Release Any CPU ------
7>C:\Users\jason\AppData\Local\Temp\i4vjq0xx\VisualRust.Setup.FileAssociation.2015.msi(0,0): warning LGHT1076: ICE71: The Media table has no entries.
8>  VisualRust.Build -> S:\Code\VisualRust\bin\VisualRust.Build\Release\VisualRust.Build.dll
9>------ Skipped Build: Project: VisualRust.Test, Configuration: Debug Any CPU ------
9>Project not selected to build for this solution configuration 
7>  VisualRust.Setup.FileAssociation.2015 -> S:\Code\VisualRust\bin\VisualRust.Setup.FileAssociation.2015\Release\VisualRust.Setup.FileAssociation.2015.msi
10>------ Build started: Project: VisualRust.Setup.MSBuild.2015, Configuration: Release x86 ------
10> C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe -d"DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\\" -dSolutionDir=S:\Code\VisualRust\ -dSolutionExt=.sln -dSolutionFileName=VisualRust.sln -dSolutionName=VisualRust -dSolutionPath=S:\Code\VisualRust\VisualRust.sln -dConfiguration=Release -dOutDir=S:\Code\VisualRust\build\..\bin\VisualRust.Setup.MSBuild.2015\Release\ -dPlatform=x86 -dProjectDir=S:\Code\VisualRust\installer\VisualRust.Setup.MSBuild\ -dProjectExt=.wixproj -dProjectFileName=VisualRust.Setup.MSBuild.2015.wixproj -dProjectName=VisualRust.Setup.MSBuild.2015 -dProjectPath=S:\Code\VisualRust\installer\VisualRust.Setup.MSBuild\VisualRust.Setup.MSBuild.2015.wixproj -dTargetDir=S:\Code\VisualRust\bin\VisualRust.Setup.MSBuild.2015\Release\ -dTargetExt=.msi -dTargetFileName=VisualRust.Setup.MSBuild.2015.msi -dTargetName=VisualRust.Setup.MSBuild.2015 -dTargetPath=S:\Code\VisualRust\bin\VisualRust.Setup.MSBuild.2015\Release\VisualRust.Setup.MSBuild.2015.msi -dVisualRust.Build.Configuration=Release -d"VisualRust.Build.FullConfiguration=Release|AnyCPU" -dVisualRust.Build.Platform=AnyCPU -dVisualRust.Build.ProjectDir=S:\Code\VisualRust\src\VisualRust.Build\ -dVisualRust.Build.ProjectExt=.csproj -dVisualRust.Build.ProjectFileName=VisualRust.Build.csproj -dVisualRust.Build.ProjectName=VisualRust.Build -dVisualRust.Build.ProjectPath=S:\Code\VisualRust\src\VisualRust.Build\VisualRust.Build.csproj -dVisualRust.Build.TargetDir=S:\Code\VisualRust\bin\VisualRust.Build\Release\ -dVisualRust.Build.TargetExt=.dll -dVisualRust.Build.TargetFileName=VisualRust.Build.dll -dVisualRust.Build.TargetName=VisualRust.Build -dVisualRust.Build.TargetPath=S:\Code\VisualRust\bin\VisualRust.Build\Release\VisualRust.Build.dll -out S:\Code\VisualRust\build\..\obj\VisualRust.Setup.MSBuild.2015\\Release\ -arch x86 msbuild.wxs Product.2015.wxs
10> C:\Program Files (x86)\WiX Toolset v3.11\bin\Light.exe -out S:\Code\VisualRust\bin\VisualRust.Setup.MSBuild.2015\Release\VisualRust.Setup.MSBuild.2015.msi -pdbout S:\Code\VisualRust\bin\VisualRust.Setup.MSBuild.2015\Release\VisualRust.Setup.MSBuild.2015.wixpdb -cultures:null -contentsfile S:\Code\VisualRust\build\..\obj\VisualRust.Setup.MSBuild.2015\\Release\VisualRust.Setup.MSBuild.2015.wixproj.BindContentsFileListnull.txt -outputsfile S:\Code\VisualRust\build\..\obj\VisualRust.Setup.MSBuild.2015\\Release\VisualRust.Setup.MSBuild.2015.wixproj.BindOutputsFileListnull.txt -builtoutputsfile S:\Code\VisualRust\build\..\obj\VisualRust.Setup.MSBuild.2015\\Release\VisualRust.Setup.MSBuild.2015.wixproj.BindBuiltOutputsFileListnull.txt -wixprojectfile S:\Code\VisualRust\installer\VisualRust.Setup.MSBuild\VisualRust.Setup.MSBuild.2015.wixproj S:\Code\VisualRust\build\..\obj\VisualRust.Setup.MSBuild.2015\\Release\msbuild.wixobj S:\Code\VisualRust\build\..\obj\VisualRust.Setup.MSBuild.2015\\Release\Product.2015.wixobj
10> VisualRust.Setup.MSBuild.2015 -> S:\Code\VisualRust\bin\VisualRust.Setup.MSBuild.2015\Release\VisualRust.Setup.MSBuild.2015.msi
11>------ Build started: Project: VisualRust.Setup.MSBuild.2017, Configuration: Release x86 ------
11> C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe -d"DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\\" -dSolutionDir=S:\Code\VisualRust\ -dSolutionExt=.sln -dSolutionFileName=VisualRust.sln -dSolutionName=VisualRust -dSolutionPath=S:\Code\VisualRust\VisualRust.sln -dConfiguration=Release -dOutDir=S:\Code\VisualRust\build\..\bin\VisualRust.Setup.MSBuild.2017\Release\ -dPlatform=x86 -dProjectDir=S:\Code\VisualRust\installer\VisualRust.Setup.MSBuild\ -dProjectExt=.wixproj -dProjectFileName=VisualRust.Setup.MSBuild.2017.wixproj -dProjectName=VisualRust.Setup.MSBuild.2017 -dProjectPath=S:\Code\VisualRust\installer\VisualRust.Setup.MSBuild\VisualRust.Setup.MSBuild.2017.wixproj -dTargetDir=S:\Code\VisualRust\bin\VisualRust.Setup.MSBuild.2017\Release\ -dTargetExt=.msi -dTargetFileName=VisualRust.Setup.MSBuild.2017.msi -dTargetName=VisualRust.Setup.MSBuild.2017 -dTargetPath=S:\Code\VisualRust\bin\VisualRust.Setup.MSBuild.2017\Release\VisualRust.Setup.MSBuild.2017.msi -dVisualRust.Build.Configuration=Release -d"VisualRust.Build.FullConfiguration=Release|AnyCPU" -dVisualRust.Build.Platform=AnyCPU -dVisualRust.Build.ProjectDir=S:\Code\VisualRust\src\VisualRust.Build\ -dVisualRust.Build.ProjectExt=.csproj -dVisualRust.Build.ProjectFileName=VisualRust.Build.csproj -dVisualRust.Build.ProjectName=VisualRust.Build -dVisualRust.Build.ProjectPath=S:\Code\VisualRust\src\VisualRust.Build\VisualRust.Build.csproj -dVisualRust.Build.TargetDir=S:\Code\VisualRust\bin\VisualRust.Build\Release\ -dVisualRust.Build.TargetExt=.dll -dVisualRust.Build.TargetFileName=VisualRust.Build.dll -dVisualRust.Build.TargetName=VisualRust.Build -dVisualRust.Build.TargetPath=S:\Code\VisualRust\bin\VisualRust.Build\Release\VisualRust.Build.dll -out S:\Code\VisualRust\build\..\obj\VisualRust.Setup.MSBuild.2017\\Release\ -arch x86 -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixVSExtension.dll" msbuild.wxs Product.2017.wxs
11> C:\Program Files (x86)\WiX Toolset v3.11\bin\Light.exe -out S:\Code\VisualRust\bin\VisualRust.Setup.MSBuild.2017\Release\VisualRust.Setup.MSBuild.2017.msi -pdbout S:\Code\VisualRust\bin\VisualRust.Setup.MSBuild.2017\Release\VisualRust.Setup.MSBuild.2017.wixpdb -cultures:null -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixVSExtension.dll" -contentsfile S:\Code\VisualRust\build\..\obj\VisualRust.Setup.MSBuild.2017\\Release\VisualRust.Setup.MSBuild.2017.wixproj.BindContentsFileListnull.txt -outputsfile S:\Code\VisualRust\build\..\obj\VisualRust.Setup.MSBuild.2017\\Release\VisualRust.Setup.MSBuild.2017.wixproj.BindOutputsFileListnull.txt -builtoutputsfile S:\Code\VisualRust\build\..\obj\VisualRust.Setup.MSBuild.2017\\Release\VisualRust.Setup.MSBuild.2017.wixproj.BindBuiltOutputsFileListnull.txt -wixprojectfile S:\Code\VisualRust\installer\VisualRust.Setup.MSBuild\VisualRust.Setup.MSBuild.2017.wixproj S:\Code\VisualRust\build\..\obj\VisualRust.Setup.MSBuild.2017\\Release\msbuild.wixobj S:\Code\VisualRust\build\..\obj\VisualRust.Setup.MSBuild.2017\\Release\Product.2017.wixobj
11> VisualRust.Setup.MSBuild.2017 -> S:\Code\VisualRust\bin\VisualRust.Setup.MSBuild.2017\Release\VisualRust.Setup.MSBuild.2017.msi
12>------ Build started: Project: VisualRust.Setup.2015, Configuration: Release x86 ------
12>S:\Code\VisualRust\src\VisualRust\VisualRust.2015.csproj(318,11): error MSB4226: The imported project "$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" was not found. Also, tried to find "$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" in the fallback search path(s) for $(VSToolsPath) - "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.
12> Done building project "VisualRust.2015.csproj" -- FAILED.
12>Done building project "VisualRust.Setup.2015.wixproj" -- FAILED.
12>
13>------ Build started: Project: VisualRust.Setup.2017, Configuration: Release x86 ------
13>S:\Code\VisualRust\src\VisualRust\VisualRust.2017.csproj(312,11): error MSB4226: The imported project "$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" was not found. Also, tried to find "$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" in the fallback search path(s) for $(VSToolsPath) - "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.
13>Done building project "VisualRust.2017.csproj" -- FAILED.
13>Done building project "VisualRust.Setup.2017.wixproj" -- FAILED.
13>
========== Build: 7 succeeded, 5 failed, 0 up-to-date, 1 skipped ==========
MaulingMonkey commented 6 years ago

This project uses submodules, run:

git submodule init
git submodule update

This project also uses git lfs, which didn't come with my install by default and may require you re-checkout LFS managed files.

jason-watkins commented 6 years ago

Thanks Monkey.

That takes care of most of the issues, but I'm still unable to load the projects that depend on VsSDK.targets. It seems like that would be because I'm missing the VS SDK, but the link in the Prerequisites section of the Readme section 404s for me, and this page indicates that the "Visual Studio extension development" workflow should install the SDK. In fact, I can find the SDK under the individual components tab of the installer, and it indicates as installed.

jason-watkins commented 6 years ago

A bit more digging led me to this issue. Removing the line

<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />

lets me load the projects.

I still get compilation errors, but it's not immediately apparent to me whether these errors are related to my removal of the VsSDK.targets line.

MaulingMonkey commented 6 years ago

Based on this thread: https://social.msdn.microsoft.com/Forums/vstudio/en-US/b5f06cdb-01e0-4102-b23f-99557b7b010c/vs-2017-rc-deploy-vsix-extension-files-error?forum=vsx

I noticed that the nuget references for VisualRust.Templates reference version 14.3.25420 of Microsoft.VSSDK.BuildTools (suspiciously similar to VS2015's version, "14.x"), but 15.1.192 has been released (suspiciously similar to VS2017's version, "15.x"). You may just need to update the package version:

I don't currently have VS2017 installed so I'm unable to test this myself. Experimenting with removing that line in my VS2015 setup causes the project and item templates to fail to generate for me, which will cause build errors when trying to create the .vsix for installation in Debug builds:

12>C:\r\packages\Microsoft.VSSDK.BuildTools.14.3.25420\tools\VSSDK\Microsoft.VsSDK.targets(520,5): error VSSDK1025: Could not add the file "C:\r\src\VisualRust....\bin\VisualRust.Templates\Release\ProjectTemplates\Rust\127\ApplicationProject.zip" to the zip package "C:\r\build..\bin\VisualRust.2015\Release\VisualRust.vsix". Could not find file 'C:\r\bin\VisualRust.Templates\Release\ProjectTemplates\Rust\127\ApplicationProject.zip'.

These .zip s aren't properly packaged into the release builds in the current master branch anyways, so that might not be a show stopper (I have a pull request open to fix this and other issues: https://github.com/PistonDevelopers/VisualRust/pull/286 )

I also get errors related to VS2017 as I don't have that installed, but only for ".2017.proj" projects. I've also been using the Debug.Lab and Release.Lab solution configurations, as for whatever reason several projects aren't set to build in the Debug and Release configurations - I vaguely recall errors relating to unbuilt projects in the non-Lab variants.

jason-watkins commented 6 years ago

Appreciate the help Monkey. I started trying to compile from source in the first place to get the #286 changes, since the latest packaged version still seems unable to create projects.

I'm still getting two errors after updating the nuget packages, but I feel like we are making progress.

Error       The system cannot find the file 'S:\Code\VisualRust\bin\VisualRust.2015\Debug\VisualRust.vsix'.
Error       The system cannot find the file 'S:\Code\VisualRust\bin\VisualRust.2017\Debug\VisualRust.vsix'.

I get the same errors both on the current PistonDevelopers master and with the #286.

I had to delete the offending line I mentioned in order to load the projects and update the nuget projects. If I add the line back after the update, the projects load, but I get some additional errors of which this looks like the most relevant:

Error       Could not load file or assembly 'PistonDevelopers.MICore, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
MaulingMonkey commented 6 years ago

Upgrading to 15.1.192 doesn't seem to break anything on VS2015 FWIW. And by adding this to one of the project <Target>s: <Message Text="VSToolsPath: $(VSToolsPath)" Importance="high" /> - I was able to see that VSToolsPath actually references the nuget package, not a visual studio install path. So your install is likely fine, it's definitely something about the nuget that's a problem. I can roll that upgrade into my PR...

For your first error, https://github.com/PistonDevelopers/VisualRust/pull/286/commits/a8a1ae0fd583e116113db33c046a1de64941a481 should fix the problem (part of that PR) - also, the release build should work OK.

For your second error, I'm currently using the absolutely hideous hack, DisableMiCorePubKeyValidation.reg:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,b03f5f7f11d50a3a]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,b03f5f7f11d50a3a]

I'm certain this is the wrong thing to do, but I haven't gotten around to figuring out what the right thing to do is.

MaulingMonkey commented 6 years ago

Hmm. Removing those registry keys doesn't seem to break anything for me currently - those errors might be from trying to build for versions of visual studio that aren't installed, or from having files that were checked out before git lfs was installed (StrongNamer.dll is one of the files stored via git lfs).

If you don't want to re-clone the entire repository, IIRC the following steps will fix things (assuming git lfs is properly installed/configured, of course):

rm -rf lib
rm -rf build
git checkout lib
git checkout build
MaulingMonkey commented 6 years ago

The solution config/platform situation is worse than I remembered. Specifically, I'm using *.Lab solution configurations, and the x86 solution platform. Any other combination is missing stuff.