ionic2 with visual studio MSB3644 error when starting new project - visual-studio

Am using visual studio 2015 but whenever i begin a new ion ionic2 project an error
MSB3644 The reference assemblies for framework ".NETFramework,Version=v4.0" were not found.
To resolve this, install the SDK or Targeting Pack for
this framework version or retarget your application to a version of the framework for
which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved
from the Global Assembly Cache (GAC) and will be used in place of reference assemblies.
Therefore your assembly may not be correctly targeted for the framework you intend.
After a research on the error i found out This link and This link but am using windows 10 on a 32 bit computer with program files folder and without the program filesx86 folder
Am not using any server and also a newbie to visual studio
I have also checked and
C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0. is there
I also found out you need to add
msbuild -p:FrameworkPathOverride="C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.
But am not sure where am supposed to add it
Can someone help me on this issue

But am not sure where am supposed to add it
Please run "Msbuild Command Prompt for VS2015"
Go to the folder of project
run the msbuild command
msbuild -p:FrameworkPathOverride="C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0"

Related

DTS.runtime.Application Error With Visual Studio 2019

Visual Studio 2019 Enterprise v16.11.15 SS Integration services 3.16
I try to Load my DTSX Package as File with Framework C# class. I add
reference to Microsoft.SqlServer.Dts.Runtime to my project with browse
dll within : C:\Program Files (x86)\Microsoft Visual
Studio\2019\Enterprise\Common7\IDE\PublicAssemblies\SSIS\150 When
running reach the instruction :
Microsoft.SqlServer.Dts.Runtime.Application a = new
Microsoft.SqlServer.Dts.Runtime.Application(); I get the following
output Error : System.IO.FileNotFoundException: 'Could not load file
or assembly 'Microsoft.SqlServer.DTSRuntimeWrap, Version=15.0.0.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its
dependencies. The specified file can not be found.'
the same Script.Main is working perfect when i downgrade the DTS.Runtime reference to the ManagedDTS version 14 or older. The problem that the TargetServerVersion of SQL Server 2019 is only able in Version 15.
If someone has a solution i would be grateful.
Finally i find solution to workaround this bug ; i have changed the visual studio project Template from Console App (.Net Framework ) to SSIS Project and then i put my code on Task Script Component. Naturally i add reference to new ManagedDTS dll for VS 2019 to my project .
Now solution is running well and i can call the function
App.SaveAndUpdateVersionToXml sucessfully to upgrade automatically all packages DTSX by Framework .Net Script.
I share with you this blog which very supported me to make solution.
https://blog.bartekr.net/2018/02/28/upgrading-ssis-projects-part-iii/
Thank you for you all

Building on a Self-hosted VSTS-BuildAgent for VS 2017 fails with error "The TransformWebConfig task could not be loaded[...]"

We made the switch to Visual Studio 2017 and having trouble with our self-hosted build agent that gets its work from VSTS.
One VSTS-build step is building all solutions with "Visual Studio Build: Build Solution ***.sln" using "Visual Studio Version: Visual Studio 2017".
The following error happens for all our projects where "ASP.NET Core Web Application (.NET Core)" was the chosen project type.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\TransformTargets\Microsoft.NET.Sdk.Publish.TransformFiles.targets(54,5): error MSB4062: The "TransformWebConfig" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0....\tools\net46\Microsoft.NET.Sdk.Publish.Tasks.dll. Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk.Publish\tools\net46\Microsoft.NET.Sdk.Publish.Tasks.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
Additional information:
From within Visual Studio 2017 the solutions built without any errors.
None of our projects include any .config transformations files (but do include .config files like web.config), still the error occurs.
Visual Studio 2017 Build Tools as well as full Visual Studio 2017 have been installed on the build server and e.g. .NET Core Class Libraries compile fine.
Installed .NET Core versions are identical between build server and developer machines.
The same errors also happen when using "MsBuild: Build Solution ***.sln" as a build step for all solutions and selecting "MSBuild: MSBuild 15.0".
The file mentioned as "Could not load file or assembly: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk.Publish\tools\net46\Microsoft.NET.Sdk.Publish.Tasks.dll" does exist in the mentioned path.
No tasks are defined within the .csproj files.
Anyone got any insight as to what might cause this?
Have a look below:
https://github.com/aspnet/websdk/pull/174
I have reported the same behavior, and it turns out to be an issue only in the 64bit version of the MSBuild, switching back to the 32bit one worked for me, until this gets fixed.
Have a look at this link. It looks like the issue was previously fixed
https://github.com/Microsoft/msbuild/issues/1010
However, recently another change was made to MSBuild (referenced from above). My hunch is this 'downgrade' is causing the 'fix' to be ignored (wrong DLL ver is being used)
https://github.com/aspnet/Scaffolding/pull/321

Visual Studio Solution DLL error

I have a visual studio solution which works fine on one machine and when I copy the complete same solution to another machine it misses few external dlls.
Both the machine have same configuration and same version of visual studio.
I tried removing reference and adding again.I am able to reference the dll and use code but when I re-build,It gives the same error.Any pointers on what could have gone wrong?
The error message I get is as below
The type or namespace name 'NameSpaceName" could not be found (are you missing a using directive or an assembly reference?)
Also the warning shows.
The primary reference "NameSpaceName" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
Both the machine have Visual Studio 2010 installed. It works on one and doesn't work on another machine
The reference you have added to the project is likely not in a subfolder of your project but referenced from the Global Assembly Cache (GAC). Since you probably didn't copy the GAC, this reference is now of a different version. Figure out which (3rd party ?) component is affected and install an older version of that component.
Typically, Visual Studio cannot target .NET 4.5, unless you applied a workaround. In that case, you can go to the project properties, Application and change Target Framework from 4.0 to 4.5.

Cannot compile .NET CF project containing Design time attributes without Visual Studio?

I'm working on a .NET Compact Framework 3.5 app. I have an automated build machine that does not have Visual Studio installed, and all has been fine.
I'm trying to a a new solution containing control projects that have DesignTimeAttributes.xmta files. MsBuild on the build machine is failing with cannot find file, C:\Program Files\Microsoft Visual Studio 9.0\SDK\v3.5\Bin\genasm.exe.
I've tried manually adding this directory and it's contents from my dev box to the build machine, but now I'm getting
c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.Common.targets(67,9): error : genasm.exe(1) : error There was an error reading arguments. Could not load file or assembly 'Microsoft.CompactFramework.Build.Tasks, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Done executing task "BuildAsmmeta" -- FAILED.
Before I struggle further with this, I thought I'd ask if anyone else out there has gotten a CompactFramework project with design time attributes building on a machine without Visual Studio?
Filburt: I've already installed the Windows SDK, the .NET SDK, and the CF SDK. I realize now that "all has been fine" in the original question doesn't make that clear.
None of the SDK's installed anything into the Microsoft Visual Studio 9.0 directory.
I've given up and installed VS at this point, but thanks for the answer.
You think need to install the Windows .NET Framework SDK on your build machine to obtain the tools that come with Visual Studio.
update
Since you stated you installed all SDKs you could check %ProgramFiles%\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.cmd for any quirks in the PATH settings. I discovered some inconsistencies there for an x64 environment.

MSBuild output vs Visual Studio output against a COM interop

I am attempting to a get a isolated build environment setup in my dev team.
The problem that I am presently hitting is a DotNet project which has a reference to a VB6 COM assembly.
The COM assembly is registered on the build system, but when I run msbuild against the sln I get the following error:
error MSB3303: Could not resolve COM reference "f630637a-718a-41c7-9c52-41f934dc4625" version 3.2. Object reference not set to an instance of an object.
The GUID for this assembly is correct, and if I load the solution up in Visual Studio it builds fine and generates Interop.* assemblies as required.
I do not wish to have the Visual Studio build as a requirement in the build steps.
How can I get msbuild from the command line to build the Interop assemblies the same as VS?
It appears that msbuild does not follow the project dependencies the same way as the IDE - as per this question
If I build the specific project that was failing before building the entire solution everything is good.

Resources