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

Reference to "Microsoft.NETFramework.ReferenceAssemblies.net40" bubbling up #902

Closed
dittodhole opened this issue Oct 14, 2022 · 6 comments
Closed
Assignees
Labels
Milestone

Comments

@dittodhole
Copy link

dittodhole commented Oct 14, 2022

Hi there,

VS shows "Microsoft.NETFramework.ReferenceAssemblies.net40" being added to a net462 project with the latest release:
image

Reason is that the package reference is not defined as private:

    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net40" Version="1.0.2" />

nuget.org provides following snippet (also for 1.0.2):

<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net40" Version="1.0.3">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>

Was the reference just manually added, or is there a reason behind making the dependency transient?
If not, could you possible revert to a private one?

And, could you possibly update the reference to 1.0.3?

Best
Andreas

@ltrzesniewski
Copy link
Member

Oops. Thanks for noticing this.

To be honest I don't understand why this package has been added. @tom-englert can you comment on this please?

@tom-englert
Copy link
Member

It did not compile on my machine, saying error MSB3644: The reference assemblies for .NETFramework,Version=v4.0 were not found.
I copied it from here: https://github.com/jbevain/cecil/blob/e052ab52e44fd2a6564964e47e79929068731916/Directory.Build.props#L16-L18, rather should have used the official nuget snippet.

@tom-englert tom-englert self-assigned this Oct 15, 2022
@tom-englert tom-englert added this to the 4.0.5 milestone Oct 15, 2022
@ltrzesniewski
Copy link
Member

ltrzesniewski commented Oct 15, 2022

That's strange, I tried to build it on my WSL without the reference, and it worked just fine. I thought the SDK is supposed to add the necessary reference assemblies automatically.

@ltrzesniewski
Copy link
Member

On a totally unrelated note:

  • Don't you prefer to merge PRs instead of rebasing them? GitHub then adds a merge commit which references the PR id, which lets you find additional info such as the comments in the PR. I'd only keep rebasing dependabot PRs.
  • Can we comment out the beep please? It's very unpleasant each time one opens the solution. ^^

@tom-englert
Copy link
Member

I have one machine where it doesn't work without, but only within VS, MSBuild works fine. Got no clue where the root cause is.

Also having net40 as the first entry in the <TargetFrameworkds> results in this fancy behavior, where VS is playing with itself:
(I don't click anything, and this will run forever)
devenv_eCS6qB9tzw

@tom-englert
Copy link
Member

Usually I prefer a flat history without the cluttered graph generated by merge, which is more confusing than helpful. (https://www.tugberkugurlu.com/archive/resistance-against-london-tube-map-commit-history-a-k-a--git-merge-hell)

Anyhow, thanks to dependabot the history of all Fody repos is rendered totally useless, so using merge instead of rebase would not make it worse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants