Getting error in visual studion whenver i publish - visual-studio-2010

I formatted my system recently and installed windows 7. so i installed all software again. when after i installed VS it is working fine only. but when i am build / publish it is showing an error. how to resolve this issue?
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9):
Warning MSB3245: Could not resolve this reference. Could not locate
the assembly "System.Web.WebPages, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to
make sure the assembly exists on disk. If this reference is required
by your code, you may get compilation errors.
Is i have to install something ah? please instruct me?

Check if the "System.Web.WebPages" dll is available in the solution/project references. If not add it (the required version). clean solution, build again. Publish.
Hope this helps.

Related

"XAMLTaskFactory" could not be loaded from Assembly

I've been trying to run x86 assembly code on my machine for schoolwork. Sadly I've been getting this error when trying to build the project files and I can't figure out what it's about and how to fix it:
Error MSB4175 The task factory "XamlTaskFactory" could not be loaded from the assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". The system cannot find the path specified hi C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\masm.targets 70
Has anyone had the same problem? I've tried making new projects, running as administrator, done a clean install of Visual Studio and all the packages, even factory reset my laptop.

May I get help resolving Package reference for .NET 4.7.2 Project?

2/3 of projects in a solution I have is running on .NET 4.7.2, the other project is a reactJS project running on .NET Core. The other two run well except one of the .NET 4.7.2 projects which seem to be trying to call packages that are not compatible with the project. The file it keeps hanging up on is the System.Threading.Tasks.Extension. The current version it is stuck on running is 4.5.2, of which I cannot downgrade and seems to not be compatible with .NET 4.7.2. I noticed that from the build logs. Here one line from the output file which seems to stand out to me:
Unified Dependency "System.Collections, Version=4.0.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Using this version instead of original version "4.0.0.0" in "C:\project\packages\System.Threading.Tasks.Extensions.4.0.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll" because there is a more recent version of this framework file.
Resolved file path is "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.2\Facades\System.Collections.dll".
(ResolveAssemblyReferences target) -> C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "System.Threading.Tasks.Extensions" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
When the browser comes up this error is shown:
Could not load file or assembly 'System.Threading.Tasks.Extensions' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I have been looking around at solutions which include meddling with the .csproj, web.config or package.config and not successful.
My goal is to have the project run successfully and resolve this conflict. Any help in resolving this issue would be greatly appreciated.
This was resolved by cleaning out all the packages and readding one by one.

Could not load file or assembly 'System.Web.RegularExpressions, Version=4.0.0.0

Last night I upgraded my Visual Studio 2017 to the latest version 15.7.0. Since then all my projects are not running any more.
The error I am getting:
Could not load file or assembly 'System.Web.RegularExpressions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I tried adding manually a referece to the DLL, I am still getting the error
I fixed the issue by 1) updating Visual Studio from 15.7.0 to 15.7.1 2) repairing the installation

syncfusion.compression.base cannot be downloaded because it is not compatible with any project in the solution

Hi, I was working on a solution using Visual Studio. While restoring the Nuget, i got the error "syncfusion.compression.base" is missing. When I tried downloading the Nuget, it gave the message as shown in screenshot. What shall I do now?
When I tried downloading the Nuget, it gave the message as shown in screenshot. What shall I do now?
You need to figure out which project installed the package before in your solution. You can check it with the package.config file.
After download the package syncfusion.compression.base from nuget.org, we could to know this package only have one assembly for .NET framework 46:
After you figure out which project installed this package, you should check the project type and target framework, make sure the target framework is .NET 46 and above.
Besides, if can not find this package in the package.config or project.json, you may need to check if your project file contains HintPath for this package, like:
<Reference Include="Syncfusion.Compression.Base, Version=15.2460.0.40, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
<HintPath>..\packages\Syncfusion.Compression.Base.15.2460.40\lib\net46\Syncfusion.Compression.Base.dll</HintPath>
<Private>True</Private>
</Reference>
To determine whether the package is what you need, if not, you need delete it in the project file and delete the package in the packages folder.

unable to load Assembly

I'm getting a strange error from my VisualStudio 2008 installation in Windows 7 and I wonder whether anyone knows how to fix that:
Unable to read the project file
"cs.proj". Could not load file or
assembly Microsoft.Build.Engine,
Version=3.5.0.0, Culture=neutral,
[...] System cannot find the file
specified.
`
I checked: .Net 3.5 is installed. So does anyone know what that means?
Thanks ;)
Try running gacutil -l to check if the MSBuild assemblies are installed
I found a thread on social.msdn.microsoft.com, http://social.msdn.microsoft.com/Forums/en/vssetup/thread/59fa45ee-ac51-4325-83fa-26389a33c22f
Iе offers that the .NET install might be corrupted and suggests uninstall .NET and do a full 3.5 SP1 install.
My IT department did a windows update and it interrupted my VS install with the "MSBuild assembly not found", and I have to wait for them to fix it because I don't have install rights.
Let me know if this works.

Resources