Replies: 3 comments 8 replies
-
Not that I'm aware of. It also seems very likely to me that changing the build based on such information would be a very bad idea. What are you trying to do? |
Beta Was this translation helpful? Give feedback.
-
You can have Preview version and no net10 support, and I think you can do net10 in the non-preview version of VS2022. It is about which SDK is in use. You need to install the net10 sdk (which becomes the default unless you specify something in the global.json file) to light up net10 support. If you want to do this, you can try: <TargetFrameworks Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreAppMaximumVersion)','10.0'))">$(TargetFrameworks);net10.0</TargetFrameworks> You might also want something like <Target Name="DetectNet10" BeforeTargets="DispatchToInnerBuilds">
<Message Importance="high" Text="NETCoreAppMaximumVersion: $(NETCoreAppMaximumVersion)" />
<Warning Condition="$([MSBuild]::VersionLessThan('$(NETCoreAppMaximumVersion)','10.0'))"
Text="net10 not supported. Please install the net10 sdk."
File="https://dotnet.microsoft.com/en-us/download/dotnet/10.0" />
</Target> This will mean your devs will get the appropriate warning, and you can check if your CI servers have net10 installed, and update any build scripts to add the appropriate SDK install. |
Beta Was this translation helpful? Give feedback.
-
I'm using following settings to check it's executed on VS Preview.
Note: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a dedicated MSBuild property or mechanism to detect when a build is running specifically inside a Visual Studio Preview instance, as opposed to a regular release version? We are aware of the BuildingInsideVisualStudio property, but it does not differentiate between stable and preview editions.
Beta Was this translation helpful? Give feedback.
All reactions