Upgrading to .NET Core 2.0: PackageTargetFallback and AssetTargetFallback cannot be used together

In .NET Core 1.0 and 1.1, it was needed to set PackageTargetFallback when referencing packages that are known to work on .NET Core but don’t officially support it – e.g. PCL libraries or libraries built for the legacy dotnet framework moniker. Due to this, the project (.csproj, .fsproj, …) will contain a line similar to: … Read more

Understanding a csproj assembly reference

Which reference-type you get depends on how you link the assembly. select the referenced assembly in the project-explorer go to the properties-page there you find a boolean flag “specific Version” true means: the assembly must have version=xxx false means: ignore the assembly version (I only have a german-vs2010 so the english translation for the german … Read more

What does mean in csproj?

The sdk-style projects have a few automatic includes. By default, the sdk has something like <None Include=”**/*”> (simplified) that is added (included) before your project’s contents. But you don’t want your file to be in the “None” set, but in the “EmbeddedResource” set. MSBuild doesn’t have any problem with the files being in more than … Read more

.csproj multiple hint paths for an assembly

The simplest way since only ONE HintPath can be used is to use the all-so-nice Condition attribute like this: <Reference Include=”TheAssembly”> <HintPath Condition=”Exists(‘..\My\Assembly\Path’)”>..\My\Assembly\Path\TheAssembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\My\Assembly\Path’)”>..\..\My\Assembly\Path\TheAssembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\..\My\Assembly\Path’)”>..\..\..\My\Assembly\Path\TheAssembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\..\..\My\Assembly\Path’)”>..\..\..\..\My\Assembly\Path\TheAssembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\..\..\..\My\Assembly\Path’)”>..\..\..\..\..\My\Assembly\Path\TheAssembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\..\..\..\..\My\Assembly\Path’)”>..\..\..\..\..\..\My\Assembly\Path\TheAssembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\..\..\..\..\..\My\Assembly\Path’)”>..\..\..\..\..\..\..\My\Assembly\Path\TheAssembly.dll</HintPath> etc… </Reference> So the answer to the question would be this: <Reference Include=”assembly”> <HintPath Condition=”Exists(‘..\..\csharp\bin’)”>..\..\csharp\bin\assembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\..\..\foo\sdk\csharp\bin’)”>..\..\..\..\foo\sdk\csharp\bin\assembly.dll</HintPath> </Reference> If multiple … Read more

What is NuGetPackageImportStamp for?

NuGetPackageImportStamp is a workaround for Visual Studio 2013 and later versions not being able to detect that a NuGet package added or removed an MSBuild import. This workaround is not required for older versions of Visual Studio. Even in Visual Studio 2013, the property can safely be removed: if you close and re-open the solution, … Read more

What does the .csproj file do?

Basically the .csproj file contains the list of files in your project, plus the references to system assemblies etc. There are a whole bunch of settings – Visual Studio version, project type, Assembly name, Application Icon, Target Culture, Installation Url,… Everything you need to build your project. While you could assume that you need everything … Read more

Visual Studio 2017 and the new .csproj InternalsVisibleTo

Just in case anyone would like to put InternalsVisibleTo within a .csproj file instead of AssemblyInfo.cs (a possible scenario is to have a naming convention between a project under test and a test project), you can do it like this: <ItemGroup> <AssemblyAttribute Include=”System.Runtime.CompilerServices.InternalsVisibleTo”> <_Parameter1>$(MSBuildProjectName).Test</_Parameter1> </AssemblyAttribute> </ItemGroup> Having this the following code will be generated [assembly: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)