Open jason-watkins opened 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.
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.
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.
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:
VisualRust.Templates
Manage Nuget Packages...
Installed
or Updates
tab, select Microsoft.VSSDK.BuildTools
and hit [Update]
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.
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)
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.
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
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.
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: