Skip to content
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

Update the SDK #1431

Merged
merged 3 commits into from
Apr 23, 2019
Merged

Update the SDK #1431

merged 3 commits into from
Apr 23, 2019

Conversation

davidfowl
Copy link
Member

@davidfowl davidfowl commented Apr 16, 2019

I'd like to try out netstandard2.1 in various extensions projects

@@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
<RuntimeIdentifiers>win7-x64;linux-x64;osx-x64</RuntimeIdentifiers>
Copy link
Member

Choose a reason for hiding this comment

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

Why? These were useful for testing the windows service.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe, they're useful for net461 maybe but we now make native exes by default. I was also just trying to see if this would fix the issue I was running into but it didn't.

Copy link
Member

Choose a reason for hiding this comment

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

I was using them for standalone publish.

Copy link
Member Author

Choose a reason for hiding this comment

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

Why? You had to do that in the past to get an exe, not you don't. What other reason did you have to self contain deploying this app?

Copy link
Member

Choose a reason for hiding this comment

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

Services run as different users without access to the repo local runtime. It's easier to deploy the runtime with the service than to tell the service how to find it.

Copy link
Member Author

Choose a reason for hiding this comment

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

You can publish self contained without putting RIDS in the prodject file and doing a RID restore. That's been the case since 2.x.

@davidfowl
Copy link
Member Author

davidfowl commented Apr 16, 2019

dotnet\sdk\3.0.100-preview4-011136\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(115,5): Error NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked.
.dotnet\sdk\3.0.100-preview4-011136\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(115,5): Error NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked.
.dotnet\sdk\3.0.100-preview4-011136\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(115,5): Error NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked.
.dotnet\sdk\3.0.100-preview4-011136\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(115,5): Error NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked.
.dotnet\sdk\3.0.100-preview4-011136\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(115,5): Error NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked.
.dotnet\sdk\3.0.100-preview4-011136\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(115,5): Error NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked.
.dotnet\sdk\3.0.100-preview4-011136\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(115,5): Error NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked.
.dotnet\sdk\3.0.100-preview4-011136\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(115,5): Error NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked.
.dotnet\sdk\3.0.100-preview4-011136\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(115,5): Error NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked.
PowerShell exited with code '1'.

Anybody know wtf this is https://github.com/aspnet/Extensions/blob/92acd8b95901f1e8f47d3d128cb5f7c38b684644/src/Shared/src/Directory.Build.props#L9

@natemcmaster
Copy link

This is how we hacked the SDK into producing '.Sources' packages.

@davidfowl
Copy link
Member Author

I see this was added:

https://github.com/dotnet/sdk/blob/8cb31b0fd0bb5d36b9781442865f2e26cf6fbedc/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L113-L116

@dsplaisted How do we build a package source only package? Is there anyway to disable this?

@dsplaisted
Copy link
Member

What is a package source only package?

The check was added to make sure that when you specify "no build", it doesn't actually run the Build target. I'm not sure there's a point in disabling the check, if you are getting the error and want to disable the check, I think you'd get the same result by no longer specifying NoBuild. However, I don't know anything about the hack Nate refers to to produce source packages, so that could be an exception.

@davidfowl davidfowl force-pushed the davidfowl/update-sdk branch from 6e350c1 to c00275a Compare April 17, 2019 16:51
@natemcmaster
Copy link

natemcmaster commented Apr 17, 2019 via email

@dsplaisted
Copy link
Member

I believe it is possible by now to use the Pack target to create a .nupkg from a .nuspec.

I think if you're getting the NoBuildRequested error, it means that some target that was running had a dependency on the Build target, so essentially you would be compiling the code anyway if the error wasn't there.

@natemcmaster
Copy link

natemcmaster commented Apr 17, 2019 via email

@dsplaisted
Copy link
Member

Yes, you still need a dummy .csproj.

Copy link

@natemcmaster natemcmaster left a comment

Choose a reason for hiding this comment

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

Further investigation into the CodeCheck.ps1 failures on ref assemblies has turned up a combination of problems:

  1. The GenAPI tool doesn't consider LangVersion when generating source GenAPI generates invalid C#  arcade#2555
  2. New versions of Roslyn are emitting IsReadOnlyAttribute for auto-properties Compiler is emitting IsReadOnlyAttribute for getter only auto properties when not targeting 8.0 roslyn#35113

@davidfowl we could try updating LangVersion to target 8.0. If that doesn't work, we'll need to hold off on this change until we find a workaround or fix.

@natemcmaster
Copy link

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s), but failed to run 1 pipeline(s).

@natemcmaster
Copy link

PR checks are passing now

@davidfowl
Copy link
Member Author

FINALLY! 😄

@davidfowl davidfowl merged commit b473a78 into master Apr 23, 2019
@natemcmaster natemcmaster deleted the davidfowl/update-sdk branch April 23, 2019 04:30
JunTaoLuo pushed a commit to dotnet/aspnetcore that referenced this pull request Feb 12, 2020
* Update the SDK

* Remove rids

* set GeneratePackgeOnBuild to true
\n\nCommit migrated from dotnet/extensions@b473a78
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Feb 28, 2020
* Update the SDK

* Remove rids

* set GeneratePackgeOnBuild to true


Commit migrated from dotnet/extensions@b473a78
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Mar 2, 2020
* Update the SDK

* Remove rids

* set GeneratePackgeOnBuild to true


Commit migrated from dotnet/extensions@b473a78
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Mar 11, 2020
* Update the SDK

* Remove rids

* set GeneratePackgeOnBuild to true


Commit migrated from dotnet/extensions@b473a78
maryamariyan pushed a commit to maryamariyan/runtime that referenced this pull request Mar 27, 2020
* Update the SDK

* Remove rids

* set GeneratePackgeOnBuild to true


Commit migrated from dotnet/extensions@b473a78
@ghost ghost locked as resolved and limited conversation to collaborators May 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants