Created
December 8, 2019 23:49
-
-
Save xgalaxy/a446591dd5da82998799c1c534eae1ba to your computer and use it in GitHub Desktop.
C# w/ C++ dependency properly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> | |
> | |
> You can try this one, it worked for me both from command line and VS | |
> (msbuild 15.7.177.53362): | |
> **ProjectReference in csproj:** | |
> | |
> ``` | |
> <ProjectReference Include="..\MyVcx\My.vcxproj"> | |
> <Project>{ProjectGuid}</Project> | |
> <Name>projectname</Name> | |
> </ProjectReference> | |
> ``` | |
> | |
> **In My.vcxproj:** add | |
> | |
> ``` | |
> <ItemGroup> | |
> .... | |
> <Content Include="$(TargetPath)" > | |
> <Link>%(Filename)%(Extension)</Link> | |
> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
> </Content> | |
> ... | |
> <!-- You can also add this for PDB --> | |
> <Content Include="$(TargetPath.Replace('.dll', '.pdb'))" > | |
> <Link>%(Filename)%(Extension)</Link> | |
> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
> </Content> | |
> </ItemGroup> | |
> ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment