csproj

Visual studio doesn't support specific csproj file

空扰寡人 提交于 2019-12-02 23:20:34
I am getting this error when I try to open the solution file of my project. The solution is 2012 file (checked using notepad). If I click on Ok, The solution opens up except for one csproject which does not load. I get a migration report in UpgradeLog.htm file, with the following error for the project which failed to load. Could not figure out much from it. Error: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?prd=12395&pver=11&sbp=ProjectTypeDeprecated&plcid=0x409&clcid=0x409&ar=MSDN&sar

Do I need AssemblyInfo while working with .NET Core?

依然范特西╮ 提交于 2019-12-02 22:13:44
Previously, AssemblyInfo.cs file was autocreated by Visual Studio to contain assembly-wide attributes, like AssemblyVersion, AssemblyName and so on. In .NET Core and ASP.NET Core, project.json is responsible for holding most of that information. So the question is: do I need to mark my assemblies with that attributes anymore? What traps can I get in if I will not mark assembly with that attributes? Set project.json has replaced the AssemblyInfo . AssemblyVersionAttribute is replaced by version property version Type: String The Semver version of the project, also used for the NuGet package.

Detected package downgrade warning (dotnet core, vs 2017)

谁说我不能喝 提交于 2019-12-02 21:37:11
I have just updated all my nuget packages for my solution (dotnet core 1.1 project). I am now getting the following warnings and I don't really know what they mean. Update: I am still getting warnings mentioned above. My web projects warn about the Microsoft.NETCore.App package (see screenshot below) and my lib projects warn about NETStandard.Library (see screenshot above) When trying to update Microsoft.NETCore.App in the NuGet package manager, I am getting the following error: Hope someone can help me get rid of those warnings and setup everything it is meant to be, so I can update all my

Why are my .csproj files getting messed up after a git rebase?

拟墨画扇 提交于 2019-12-02 19:27:41
In a .NET C# project which uses GIT for source control, I keep getting malformed csproj files after rebasing to get the most recently commited code. This is my process: commit my code build and run tests rebase to "get latest" curse the heavens, as the csproj file is screwed up... AGAIN Here's the output on the rebase: D:\GitHub\AwesomeProject>git rebase master First, rewinding head to replay your work on top of it... Applying: added getstatus call Using index info to reconstruct a base tree... M Host/Host.csproj M Host/packages.config M Trees/Trees.csproj M Trees/packages.config M UnitTests

Visual Studio 2017 and the new .csproj InternalsVisibleTo

心不动则不痛 提交于 2019-12-02 19:02:25
Where do I put InternalsVisibleTo from AssemblyInfo in the new Visual Studio 2017 .csproj project file? To clarify Hans Passant's comment above, you simply have to add InternalsVisibleTo to any cs file in your project. For example, I created an AssemblyInfo.cs file in the root of the project and then added the following content (only): using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=<ADD_KEY_HERE>")] Just in case anyone would like to put InternalsVisibleTo within a .csproj file instead of AssemblyInfo.cs ( a possible scenario is to have

In a .csproj file, what is <None Include=“…”> for?

随声附和 提交于 2019-12-02 18:17:45
How is <None Include="C:\foo.bar" /> different from <Content Include="C:\foo.bar" /> ? adrianbanks The MSDN article on the build action property explains the differences. None - The file is not included in the project output group and is not compiled in the build process. An example is a text file that contains documentation, such as a Readme file. Content - The file is not compiled, but is included in the Content output group. For example, this setting is the default value for an .htm or other kind of Web file. One difference is how they get published; "None" items don't get included in a

Can files be nested in VS2017 Solution Explorer for .NET Core (non-ASP.NET Core) projects?

ぃ、小莉子 提交于 2019-12-02 16:55:27
In "old school" MSBuild projects - as still used by Windows Forms in VS2017 for example - files could be "nested" via a DependentUpon item in the csproj file. I used this to group unit tests together in Noda Time, e.g. <Compile Include="LocalDateTest.PeriodArithmetic.cs"> <DependentUpon>LocalDateTest.cs</DependentUpon> </Compile> That led to easily-navigable tests: I knowingly "lost" this feature when moving to project.json for .NET Core, but had hoped it would return when converting to MSBuild. However, it looks like MSBuild projects based on the .NET Core SDK (root element <Project Sdk=

How do you set nuget contentFiles CopyToOutput value to true when using a .Net Standard library .csproj?

社会主义新天地 提交于 2019-12-01 16:34:18
I've been looking for any way to set the CopyToOutput attribute to true for content files I'm including in a nuget package built in VS2017 from a .Net Standard Library project. When adding the files using the Content node I can see the files in the package but when looking at the nuspec that is pulled out when it's cached locally there is no CopyToOutput, so it's false by default. In this case when it's referenced in an asp.net core site, nothing is copied into the application. If I manually update that cached version to include the attribute and set it to true and restore, everything gets

Error HRESULT E_FAIL when pasting references in Visual Studio

回眸只為那壹抹淺笑 提交于 2019-12-01 16:00:44
I know this isn't a programming question but it is a programming tool question. In Visual Studio 2008 Team Edition (version 9.0 with .NET 3.5 SP1) when I copy and paste references from one csproj to another (with the context menu in the 'Solution Explorer' view) I get the following error: Error HRESULT E_FAIL has been returned from a call to a COM component This has only just started happening on my machine. I can only find this article about it, and it contains no solution. Any ideas? Yikes , E_FAIL is the most generic COM error , since it literally means a COM function returned fail. I would

How do you set nuget contentFiles CopyToOutput value to true when using a .Net Standard library .csproj?

…衆ロ難τιáo~ 提交于 2019-12-01 15:47:33
问题 I've been looking for any way to set the CopyToOutput attribute to true for content files I'm including in a nuget package built in VS2017 from a .Net Standard Library project. When adding the files using the Content node I can see the files in the package but when looking at the nuspec that is pulled out when it's cached locally there is no CopyToOutput, so it's false by default. In this case when it's referenced in an asp.net core site, nothing is copied into the application. If I manually