lavender
lavender copied to clipboard
One or more projects in the solution were not loaded correctly
I tried Commit: 184656b31918ffcc9946335e51ed67347ab900f7 [184656b] with Bazel 0.26.0 and Visual Studio 2019 and Visual Studion 2017 on a HelloWorld example.
HelloWorld/WORKSPACE
workspace(name = "HelloWorld")
HelloWorld/BUILD
cc_binary(
name = "HelloWorld",
srcs = ["main.cpp"],
)
HelloWorld/main.cpp
#include <iostream>
using namespace std;
int main() {
cout << "Hello World!" << endl;
}
I switched in Powershell to my HelloWorld folder (E:/dev/BazelDemos/HelloWorld) and typed:
python C:\lavender\generate.py
start .\msbuild\HelloWorld.sln
When Visual Studio starts it shows me "One or more projects in the solution were not loaded correctly. Please see Output Window for details"
Output window reports: " Project E:\HelloWorld.vcxproj" could not be found."
The HelloWorld.vcxproj file is located under E:\dev\BazelDemos\HelloWorld\msbuild\HelloWorld.vcxproj
When I open the generated solution file (HelloWorld.sln) in a text editor line 5 looks like this:
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloWorld","\HelloWorld.vcxproj", "{00000000-0000-3000-A000-00003D2EF56C}"
If I change it to (removing the backslash character "")
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloWorld", "HelloWorld.vcxproj", "{00000000-0000-3000-A000-00003D2EF56C}"
I can open the solution