csproj

How to get .NET Core projects to copy NuGet references to build output?

北战南征 提交于 2019-11-26 14:20:33
I'm trying to write a plugin system with .NET Core, and one of my requirements are to be able to distribute the plugin DLL along with it's dependencies to the user for install. However, I can't figure out how to include my NuGet dependencies as a build artifact and have them output to the build folder, without having to use dotnet publish as a hack. Is there some way I can specify this in the csproj? Martin Ullrich You can add this to a <PropertyGroup> inside your csproj file to enforce copying NuGet assemblies to the built output: <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies

Is there a way to automatically include content files into asp.net project file?

为君一笑 提交于 2019-11-26 14:16:15
I'm frequently adding a lot of content files (mostly images and js) to my ASP.NET project. I'm using VS publish system, and on publish, new files are not published until I include them in the project. I would like to auto include all files in specified directory. Is there a way to specify which directories should be auto-included in csproj file or anywhere else? Old thread, I know, but I found a way to do this that I keep forgetting, and on my search to find it one last time, I stumbled upon this question. The best way I've found to this is is to use the BeforeBuild target in the .csproj file.

What use is the Aliases property of assembly references in Visual Studio 8

丶灬走出姿态 提交于 2019-11-26 13:18:40
When I add an assembly reference to a project in Visual Studio 8 the Aliases property, of that reference, is set to "global". What is this property good for and why is it set to global? MSDN tells me that this is a list of aliases for the assembly but not why I might want to use this property or why most are aliased as "global". MSDN reference This is for "extern aliases". Suppose you want to use two different types, both of which are called Foo.Bar (i.e. Bar in a namespace of Foo ). The two types will be in different assemblies (by definition) - you use the property in VS to associate an

Is there a way to automatically include content files into asp.net project file?

混江龙づ霸主 提交于 2019-11-26 05:55:46
问题 I\'m frequently adding a lot of content files (mostly images and js) to my ASP.NET project. I\'m using VS publish system, and on publish, new files are not published until I include them in the project. I would like to auto include all files in specified directory. Is there a way to specify which directories should be auto-included in csproj file or anywhere else? 回答1: Old thread, I know, but I found a way to do this that I keep forgetting, and on my search to find it one last time, I

What use is the Aliases property of assembly references in Visual Studio 8

僤鯓⒐⒋嵵緔 提交于 2019-11-26 05:54:15
问题 When I add an assembly reference to a project in Visual Studio 8 the Aliases property, of that reference, is set to \"global\". What is this property good for and why is it set to global? MSDN tells me that this is a list of aliases for the assembly but not why I might want to use this property or why most are aliased as \"global\". MSDN reference 回答1: This is for "extern aliases". Suppose you want to use two different types, both of which are called Foo.Bar (i.e. Bar in a namespace of Foo ).

How to get .NET Core projects to copy NuGet references to build output?

不想你离开。 提交于 2019-11-26 03:07:41
问题 I\'m trying to write a plugin system with .NET Core, and one of my requirements are to be able to distribute the plugin DLL along with it\'s dependencies to the user for install. However, I can\'t figure out how to include my NuGet dependencies as a build artifact and have them output to the build folder, without having to use dotnet publish as a hack. Is there some way I can specify this in the csproj? 回答1: You can add this to a <PropertyGroup> inside your csproj file to enforce copying