From 5ee3154f651428b1a57d0d87be4e462728446842 Mon Sep 17 00:00:00 2001 From: Sumit Bhardwaj Date: Tue, 1 Feb 2022 07:02:13 -0800 Subject: VS: .Net SDK Style projects can add Reference to dlls When support for `DOTNET_SDK` was added, only a minimal set of options were built in. Based on user feedback, support for reference to dlls (not just projects) is needed. That support is added here. Fixes: #23166 --- Source/cmVisualStudio10TargetGenerator.cxx | 1 + Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index f325994..be46825 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -928,6 +928,7 @@ void cmVisualStudio10TargetGenerator::WriteSdkStyleProjectFile( this->WriteDotNetDocumentationFile(e0); this->WriteAllSources(e0); + this->WriteDotNetReferences(e0); this->WritePackageReferences(e0); this->WriteProjectReferences(e0); } diff --git a/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake b/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake index 60066ab..c585f5e 100644 --- a/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake +++ b/Tests/RunCMake/VsDotnetSdk/VsDotnetSdk.cmake @@ -15,4 +15,7 @@ add_executable(DotNetSdk csharponly.cs) target_link_libraries(DotNetSdk dotNetSdkLib1) set_target_properties(DotNetSdk PROPERTIES - VS_GLOBAL_RuntimeIdentifier win10-x64) + VS_GLOBAL_RuntimeIdentifier win10-x64 + + VS_DOTNET_REFERENCE_SomeDll + ${PROJECT_SOURCE_DIR}/SomeDll.dll) -- cgit v0.12