Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions modules/vstudio/tests/cs2005/test_netcore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,20 @@ function suite.allowUnsafeProperty_core()
</PropertyGroup>
]]
end

function suite.project_element_configurations()
p.action.set("vs2022")
dotnetframework "net8.0"
prepareProjectProperties()

configurations { "Debug","Release","Distribution"}
test.capture [[
<PropertyGroup>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From UT, indentation seems mismatching: check number of spaces or tab?

<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<TargetFramework>net8.0</TargetFramework>
<Configurations>Debug;Release</Configurations>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Distribution" seems missing...

<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>
]]
end
1 change: 1 addition & 0 deletions modules/vstudio/vs2005_csproj.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
dotnetbase.bindingRedirects,
dotnetbase.netcore.useWpf,
dotnetbase.csversion,
dotnetbase.projectConfigurations,
dotnetbase.netcore.enableDefaultCompileItems,
}
else
Expand Down
9 changes: 8 additions & 1 deletion modules/vstudio/vs2005_dotnetbase.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@
_p(1,'</PropertyGroup>')
end


--
-- Write the available configurations to have correct configuration mapping on vs2022 format and later.
--
function dotnetbase.projectConfigurations(prj)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That function is never called.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know, i don't kown where to put so it gets placed in the primary property group.

if _ACTION >= "vs2022" and #prj.configurations > 0 then
_p(2,'<Configurations>%s</Configurations>',table.implode(prj.configurations,"", "", ";"))
end
end
--
-- Write out the settings for the project configurations.
--
Expand Down
Loading