An item with the same key has already been added. Key: TMP
See original GitHub issueSteps to reproduce
mkdir hwapp
cd hwapp
dotnet new
dotnet restore
dotnet run
Expected behavior
I expecdted to see the “Hello World!” output.
Actual behavior
C:\Users\ohnob\OneDrive\Documents\Visual Studio 2015\Projects\hwapp>dotnet run
Project hwapp (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing
Compiling hwapp for .NETCoreApp,Version=v1.0
An item with the same key has already been added. Key: TMP
C:\Program Files\dotnet\dotnet.exe compile-csc @C:\Users\ohnob\OneDrive\Documents\Visual Studio 2015\Projects\hwapp\obj\Debug\netcoreapp1.0\dotnet-compile.rsp returned Exit Code 1
Compilation failed.
0 Warning(s)
0 Error(s)
Time elapsed 00:00:00.1135244
Environment data
dotnet --info
output:
C:\Users\ohnob\OneDrive\Documents\Visual Studio 2015\Projects\hwapp>dotnet --info
.NET Command Line Tools (1.0.0-preview2-003121)
Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529bc5
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
C:\Users\ohnob\OneDrive\Documents\Visual Studio 2015\Projects\hwapp>set | grep -ie TMP
TEMP=C:\msys64\tmp
TMP=C:\msys64\tmp
tmp=C:\Users\ohnob\AppData\Local\Temp
Issue Analytics
- State:
- Created 7 years ago
- Comments:29 (8 by maintainers)
Top Results From Across the Web
An item with the same key has already been added
Most likely, you have model which contains the same property twice. Perhaps you are using new to hide the base property.
Read more >Error "An item with the same key has already been added"
This article helps to fix the error "An item with the same key has already been added". Applies to: Windows Server 2012 R2...
Read more >An item with the same key has already been added.
1) in the Package Manager window, but I'm not sure if I'm actually using it as I downloaded TMP when it was available...
Read more >An item with the same key has already been added Error
The error reads: "An item with the same key has already been added." It does not matter if I include the database name...
Read more >SSRS Quick Tip – An item with the same key has already ...
I was in the process of creating a new report in SQL Server Reporting Services today. I was loading my dataset from a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dsplaisted you need to add two environment variables which differ in case, like
FOO
andfoo
, then rundotnet restore
, or any other command, which shells out to another program. This should trigger the exception:The problem is the new implementation of
ProcessStartInfo
, which behaves differently to the one in the .NET Framework. This is actually already being tracked at dotnet/corefx#13146.👍 always a good idea to namespace/prefix all your environment variables with app name, e.g.
DOTNETCLI_TMP
.