-
Notifications
You must be signed in to change notification settings - Fork 78
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
Allow defining project dependencies. #321
Comments
The project dependencies section of a solution file has always been a point of contention. If you only specify build order in a solution file, there is no guarantee that projects will build directly. I'm not opposed to adding this functionality to SlnGen since it exists in solution files themselves, but I would recommend you don't use project dependencies at all. Instead, you can add ProjectReference items to projects that depend on this VCXPROJ and set appropriate metadata so that you only have a build-time dependency and that's it. <ItemGroup>
<ProjectReference Include="..\NativeWrapper\NativeWrapper.vcxproj"
ReferenceAssemblyOutput="false"
SkipGetTargetFrameworkProperties="false" />
</ItemGroup> SlnGen would generate the same solution but MSBuild and Visual Studio would always build NativeWrapper.vcxproj first, making it possible to build a project or a solution correctly. |
I totally agree that this should be solved in the projects themselves, and that's exactly the first thing I tried, however we ran into issues with this approach:
We can work around # 1 by making the dependency conditional, but that was far from perfect; And I could not get a workaround in place for # 2. For that reason it seems to me the simplest solution is to instead use the build dependency system in the sln file. |
It seems like a
|
Hello.
In my company's projects we now have a few native libraries that are wrapped by CppSharp, and that requires dedicated projects to setup the bindings. We'd like to add dependencies to those projects so they build order is correct.
This is possible with the ProjectDependencies section:
Currently it seems it is not possible to generate this information with SlnGen.
The text was updated successfully, but these errors were encountered: