Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Removed Sdk.props and Sdk.targets imports #2618

Closed
wants to merge 2 commits into from
Closed

Removed Sdk.props and Sdk.targets imports #2618

wants to merge 2 commits into from

Conversation

perlun
Copy link

@perlun perlun commented Jan 30, 2017

These seem not to be needed any more; they cause a warning to be printed out on build:

/Volumes/extra/git/perlun/zup/zup.csproj(2,3): warning MSB4011: "/usr/local/share/dotnet/sdk/1.0.0-preview4-004233/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.props" cannot be imported again. It was already imported at "/Volumes/extra/git/perlun/zup/zup.csproj". This is most likely a build authoring error. This subsequent import will be ignored.
/Volumes/extra/git/perlun/zup/zup.csproj : warning MSB4011: "/usr/local/share/dotnet/sdk/1.0.0-preview4-004233/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.targets" cannot be imported again. It was already imported at "/Volumes/extra/git/perlun/zup/zup.csproj (34,3)". This is most likely a build authoring error. This subsequent import will be ignored.

These seem not to be needed any more; they cause a warning to be printed out on build:

```
/Volumes/extra/git/perlun/zup/zup.csproj(2,3): warning MSB4011: "/usr/local/share/dotnet/sdk/1.0.0-preview4-004233/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.props" cannot be imported again. It was already imported at "/Volumes/extra/git/perlun/zup/zup.csproj". This is most likely a build authoring error. This subsequent import will be ignored.
/Volumes/extra/git/perlun/zup/zup.csproj : warning MSB4011: "/usr/local/share/dotnet/sdk/1.0.0-preview4-004233/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.targets" cannot be imported again. It was already imported at "/Volumes/extra/git/perlun/zup/zup.csproj (34,3)". This is most likely a build authoring error. This subsequent import will be ignored.
```
Also made it more explicit what part needs to be added.
@dnfclas
Copy link

dnfclas commented Jan 30, 2017

Hi @perlun, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, DNFBOT;

@jkotas
Copy link
Member

jkotas commented Jan 30, 2017

I have download the latest dotnet cli tools (1.0.0-rc4-004707) and tried your update. I am getting following error on Windows:

LINK : fatal error LNK1181: cannot open input file 'native\.obj' [C:\repro\repro.csproj]
c:\corert\bin\Product\Windows_NT.x64.Debug\packaging\publish1\Microsoft.NETCore.Native.targets(151,5): error MSB3073: The command "link  @"native\link.rsp"" exited with code 1181. [C:\repro\repro.csproj]
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp1.0</TargetFramework>
  </PropertyGroup>

 <Import Project="$(IlcPath)\Microsoft.NETCore.Native.targets" />
</Project>

I expect that Mac will hit the same problem.

This works fine with the latest dotnet cli:

<Project>
  <Import Project="$(MSBuildSDKsPath)\Microsoft.NET.Sdk\Sdk\Sdk.props" /> 

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp1.0</TargetFramework>
  </PropertyGroup>

  <Import Project="$(MSBuildSDKsPath)\Microsoft.NET.Sdk\Sdk\Sdk.targets" /> 
  <Import Project="$(IlcPath)\Microsoft.NETCore.Native.targets" />
</Project>

@jkotas
Copy link
Member

jkotas commented Jan 30, 2017

Could you please update this PR to be compatible with the latest cli bits? Maybe add a note that the cli are still moving target and the cli tools version that the instructions have been validated on.

@perlun
Copy link
Author

perlun commented Jan 30, 2017

I have download the latest dotnet cli tools (1.0.0-rc4-004707) and tried your update. I am getting following error on Windows:

Interesting! The version I tried with was this, on macOS:

.NET Command Line Tools (1.0.0-preview4-004233)

I don't even know where to get the rc4, to be honest. The versioning here seems somewhat confused. 😉

@jkotas
Copy link
Member

jkotas commented Jan 30, 2017

I don't even know where to get the rc4, to be honest

Installers and Binaries at https://github.com/dotnet/cli/ contains links to the latest bits.

I usually download the .zip or .tgz for the latest bits without installing it globally on the machine. Download the .NET Core SDK Binaries .tgz for MacOSX, untar it somewhere and then run dotnet tool explicitly from that location.

@perlun
Copy link
Author

perlun commented Jan 31, 2017

Installers and Binaries at https://github.com/dotnet/cli/ contains links to the latest bits.

You're right, it has the rc4 there. Interesting - it's not present on the Releases page and https://www.microsoft.com/net/core gives me preview2 (!) which is rather old now.

rc4 seems to have a higher build number (004707) vs preview4 (004233). I'll download rc4 and try with that, thanks.

@perlun
Copy link
Author

perlun commented Jan 31, 2017

Btw @jkotas, do you happen to know why the cli installers include .NET Core 1.0.1 instead of the newer .NET Core 1.1? (They work with targetting .NET Core 1.1 as well, you just have to install that separately; I just wonder whey they ship with an older version of the platform itself).

@jkotas
Copy link
Member

jkotas commented Jan 31, 2017

I believe that it was fixed by dotnet/cli#5225

@perlun
Copy link
Author

perlun commented Feb 2, 2017

I believe that it was fixed by dotnet/cli#5225

OK, sounds good!

I need to do some more digging on this one, since rc4 broke my Visual Studio Code intellisense (I installed it globally, instead of taking your suggested approach...). So will need to download it and retry. The ball is in my court.

@jkotas
Copy link
Member

jkotas commented Feb 14, 2017

Hello @perlun It does not look like you are working on this anymore. I have submitted #2750 to make the documentation match the latest CLI and also mention CLI version that it was tested on. Hopefully, it should fix the problem you have run into originally.

Thanks anyway!

@perlun
Copy link
Author

perlun commented Feb 26, 2017

Hello @perlun It does not look like you are working on this anymore. I have submitted #2750 to make the documentation match the latest CLI and also mention CLI version that it was tested on. Hopefully, it should fix the problem you have run into originally.

Thanks for that! Yeah, sorry for not getting back. In general, I feel the current approach with preview2, preview4, rc4 and so forth (sometimes including .NET Core 1.0, other times 1.1 etc...) has been a bit confusing to me. 😉 It's also been weird that some of these versions have been hard to get working with VS Code, dotnet/vscode-csharp#1161. But, I managed to get it working now again by installing both preview2, then preview4 then rc4... 🤣

Anyway, glad to see you're already started work on the .NET Core 2.0 stuff, even before the CLI tools 1.0 is shipping. 😊 Will the CLI version and .NET Core version converge in the 2.0 series? I for one would find that a great improvement, while I also understand the need for sometimes letting them diverge...

@perlun perlun deleted the patch-1 branch February 26, 2017 20:45
@jkotas
Copy link
Member

jkotas commented Feb 26, 2017

Will the CLI version and .NET Core version converge in the 2.0 series?

Check the discussion at https://github.com/dotnet/core-setup/issues/1590

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.

3 participants