RSS

Category Archives: Visual Studio

MSB3026: Could not copy “xxx.dll” to “other/xxx.dll

With Visual Studio 2015 I have often the case that following MsBuild exception occurs

warning MSB3026: Could not copy “SomePath/SomeDll.dll” to “SomeOtherPath/SomeDll.dll”. Beginning retry 1 in 1000ms. The process cannot access the file ‘SomePath/SomeDll.dll’ because it is being used by another process.

To get rid of this exception just kill the Visual Studio 2015 Remove Debugger

You can also execute following Command Line command:

taskkill /f /fi "Imagename eq msvsmon.exe"
Advertisements
 
Leave a comment

Posted by on October 28, 2015 in Visual Studio

 

Tags: ,

Update NuGet.exe

NuGet allows you to update third party packages, which you have referenced in your projects, but how do you update NuGet itself? After updating NuGet from the Package Manager, the old NuGet version will remain in the .nuget folder of your solution. In order to update the executable you have two options:

  • Delete the .nuget folder from both, the solution folder and from disk. Then you should restart Visual Studio. After restarting and opening the solution, you have to right-click on the solution node and select Enable NuGet package restore. This command will copy a new version of NuGet into your solution folder and reference it. The drawback is that if you did not backup the nuget.targets you will lose every modification that you did on this file.
  • open the command line, navigate to the .nuget folder and execute the following command:
    nuget.exe update -self

After completing one of both steps you should have that, the new version of NuGet got copied into the solution.

 
Leave a comment

Posted by on February 13, 2013 in Visual Studio

 

Tags: ,

Error 04018: The “SqlBuildTask” task failed unexpectedly

I intend to use a SQL Server Database Project in my Visual Studio Solution to manage the database. This is a very nice feature and you should try it. Nevertheless, after upgrading the SQL Server Management Studio 2012 to SP1 I was not able to build the SQL Server Database Project anymore. I always got the following error message:

Error 2 04018: The “SqlBuildTask” task failed unexpectedly. System.MissingMethodException: Method not found: ‘Void Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.Serialize(System.IO.TextWriter, System.Collections.Generic.IEnumerable`1)’. at Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.SerializeModel(String outputFile) at Microsoft.Data.Tools.Schema. Tasks.Sql.SqlBuildTask.ExecuteSerializeModelStep() at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteStep(Func`1 step) at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.Execute() at Microsoft.Build.BackEnd. TaskExecutionHost.Microsoft. Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd. TaskBuilder.d__20.MoveNext() C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\ Microsoft.Data.Tools.Schema.SqlTasks.targets

After a few attempts, I found the solution. I just downloaded and installed the new version of (SQL Server Data Tools)[http://msdn.microsoft.com/en-US/data/hh297027] and the exception has disappeared.

 
5 Comments

Posted by on January 16, 2013 in SQL, Visual Studio

 

Tags: ,

Projects have recently been added to this solution. Do you want to get them from source control?

Do you ever have this exception during the opening of a solution?

Projects have recently been added to this solution. Do you want to get them from source control?

What is this exception saying? In my case it was that, I have created a new project on another computer. Then I checked-in the solution changes without checking-in the changes of the new project. After checking-out the changes on another computer, I got this exception. Now the issue is clear. The solution file has the information about the new project but the new project does not exists on the Team Foundation Server. You can see that the solution file has the information about the new project by opening the Solution Explorer. There should be a project that has a name that contains the description “unavailable”. To resolve the problem, either delete the newly created project or check-in any changes from the computer where you created it.

 
Leave a comment

Posted by on December 6, 2012 in Visual Studio

 

Tags: ,

XAML Designer NotSupportedException

Today I got following exception when I tried to display a XAML Control in the XAML-Designer offered from Visual Studio 2012.

An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

The exception message intended to say that you have at least one referencing assembly that you have downloaded from the internet. By default, such assemblies are blocked by the Operating System. If you open the file’s preferences, you see following string at the bottom of the window:

This file came from another computer and might be blocked to help protect this computer:


Exactly about this fact Visual Studio warns you. If you trust the creator of that assembly, you can avoid this problem by clicking Unblock.

After that, you should clean your solutions Debug and Release folder in order to ensure that the right unblocked assemblies are copied in the solutions output directory.

Then Visual Studio should continue showing the XAML designer.

 
Leave a comment

Posted by on September 13, 2012 in Visual Studio, WPF

 

Tags: ,

Visual Studio 2012: Framework does not meet the minimum required version

Today I tried to upgrade my Visual Studio 2012 RC to the RTM version. But I got an error saying that i do not have installed the required .NET Framework.

The .Net Framework installed on this machine does not meet the minimum required version: 4.5.50709.

So I thought that maybe the problem is that in order to install the RTM of Visual Studio I have to install the RTM version of the .NET Framework. Therefore I thought that if will I download the .Net Framework 4.5 and install it I can proceed the Visual Studio installation process. I was wrong.
But after starting the setup file of the .NET Framework it shows me following error:

Microsoft .NET Framework 4.5 is already a part of this operating system.  You do not need to install the .NET Framework 4.5 redistributable.

Well that’s strange. Never mind. I could not install the RTM version of 4.5 and therefore I cannot install the RTM of Visual Studio.

After some web researches I got the answer that in order to install the final version of Visual Studio 2012 I have to have the final version of Windows 8.
Everybody that runs a Windows 8 Release Preview (or lower) needs to wait until they gets a full copy or they can download the 90 days trial version of Windows 8.

 
Leave a comment

Posted by on September 5, 2012 in Visual Studio, Windows 8

 

Tags: , ,

SQL Server Data Tools Installation hangs

If you try to install the SQL Server Data Tools you might have the situation that the installation process hangs on a particular package. You can wait and wait, but the installation process will not continue.
I do not know why this happens, but I got a solution. Cancel the install process via the Task Manager by killing the process. Open the SQL Server 2012 Feature Pack site and download and install/repair the component that suspends the installation process. Then you can retry installing the whole suite.

 
Leave a comment

Posted by on June 4, 2012 in SQL, Visual Studio

 

Tags: