-
-
Notifications
You must be signed in to change notification settings - Fork 618
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
.NET C# no way to enable different .NET sdk's on .netcore projects! #2289
base: master
Are you sure you want to change the base?
Conversation
(functional result stays the same)
website/docs/dotnetsdk.md
Outdated
|
||
|
||
## mstest ## | ||
to make the MSTest sdk work you need to add the version to `global.json`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to generate that file too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes i was thinking about that but how would i make it so you could specify the version? or do i just have a default version and tell people where they can change it! and code for writing the file as i am not familliar with the file api's of premake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it is adapted but something like MSTest-3.6.1
might be an option
if version are limited, you might hard-code them, else extract version after '-' is also possible.
Co-authored-by: Joris Dauphin <[email protected]>
…tion to new dedecated function! (global.json file writing not workin)
also made it so it does not overwrite global.json when it already exists potentially overwriting variables
website/docs/dotnetsdk.md
Outdated
|
||
|
||
## mstest ## | ||
to make the MSTest sdk work you need to add the version to `global.json`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to make the MSTest sdk work you need to add the version to `global.json`: | |
To make the MSTest SDK work you need to add the version to `global.json`: |
Also, according to this you don't need to use global.json
, you can have the version in the .csproj
with the SDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes that is correct but specifiying it becomes a little hard so i decided on the global.json route
website/docs/dotnetsdk.md
Outdated
} | ||
``` | ||
:::warning | ||
`global.json` needs to be located in the same folder as your solution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`global.json` needs to be located in the same folder as your solution | |
`global.json` needs to be located in the same folder as your solution. |
website/docs/dotnetsdk.md
Outdated
Visual studio is the only toolset currently supported. | ||
|
||
### Examples ### | ||
use the web sdk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description is unnecessary, the example is self-documenting.
@@ -0,0 +1,101 @@ | |||
-- | |||
-- tests/actions/vstudio/cs2005/test_dotnetsdk.lua | |||
-- Test DocumentationFile feature Visual Studio 2005+ C# project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't updated.
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> | ||
]] | ||
end | ||
function suite.testMSTest() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
global.json part is not tested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how would i go about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue is probably that global.json doesn't follow other file generation and so dotnetbase.netcore.dotnetsdk
would be misplaced...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you happen to know where i can find another example of this file generating?
…in test case but is written in normal ussage
…ause the file is created fine when using in non test environment! also tried changing dir to _TESTS_DIR to no avail.
Could it be that tests are blocked from creating files? wich would explain why the file is not found! |
What does this PR do?
Add support for setting .NET sdk using dotnetsdk option. (only on new format projects otherwise just use the defautl)
Web
Razor
Worker
Blazor (BlazorWebAssembly)
WindowsDesktop
default (Microsoft.NET.Sdk)
How does this PR change Premake's behavior?
adds a new option called dotnetsdk
Anything else we should know?
Add any other context about your changes here.
Did you check all the boxes?
closes #XXXX
in comment to auto-close issue when PR is merged)You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!
for some reason it took the commits from my previous pr (add C# documentation file to) i didn't change these files tho!
closes #2288