I'm developing an app with C# & Visual Studio 2015 Community for windows 10.
I was trying to create a package for store (appxupload file) but it gives me error:
Loading assembly "C:\Users\Ramtin\.nuget\packages\System.Private.Uri\4.0.0\runtimes\win8-aot\lib\netcore50\System.Private.Uri.dll" failed. System.IO.FileNotFoundException: Could not load file or assembly 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Invalid Resx file. String reference not set to an instance of a String.
Parameter name: suffix MyAPP C:\Users\Ramtin\.nuget\packages\System.Private.Uri\4.0.0\runtimes\win8-aot\lib\netcore50\System.Private.Uri.dll
how can I solve this?
note: I have individual account for develop
I haven't received this error myself, but you should verify that you have the latest Windows 10 SDK installed and latest VS2015 updates.
Visual Studio 2015 Update 2 just came out last week: https://www.visualstudio.com/en-us/news/vs2015-update2-vs.aspx
When you launch VS2015, check the notifications area on the top right for any newly available updates.
When you click File | New | Project in VS2015, check the list of Universal project template types and look to see if there's a list item that prompts you to download the latest SDK.
My screenshot below shows the template types and also the (optional) Template10 that I have available to me. If you don't have the latest SDK, you should see an additional entry that prompts you to download the latest SDK (as opposed to creating a new project)
After verifying that you have the latest of everything, try generating a new package again and please comment below to let us know whether it worked (or if you are still getting errors).
Related
We have a .net core 3.1 solution, which we are able to compile (using Visual Studio 2019) and publish. We gave the solution to our team which is setting up the deployment process. While trying the build (linux container) they are seeing the below error:
CommonLib -> /srv/jenkins_work/DSS/ewcms/CMS/CommonLib/bin/release/netcoreapp3.1/CommonLib.dll
CSC : error CS8032: An instance of analyzer Microsoft.EntityFrameworkCore.InternalUsageDiagnosticAnalyzer cannot be created from /var/lib/jenkins/.nuget/packages/microsoft.entityframeworkcore.analyzers/5.0.9/analyzers/dotnet/cs/Microsoft.EntityFrameworkCore.Analyzers.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.. [/srv/jenkins_work/DSS/ewcms/CMS/Microsoft.EntityFrameworkCore.UnitOfWork/Microsoft.EntityFrameworkCore.UnitOfWork.csproj]
The file mentioned Microsoft.EntityFrameworkCore.Analyzers.dll is there in the folder mentioned in the error. other projects in the same solution have this as a warning, but this particular project shows it as an error.
Reading online many said to install Visual Studio, but that is something they said they can not do in the container, is there another way to get around this issue? Or something in particular we need to look at in that project which is causing and error rather than a warning?
After some investigation, turned out that project had the setting:
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
which was not there in the other projects, which were showing it as warnings only. Changed this to false and this project is also going through now, it comes up as a warning and allows the build to go through.
I'm working with a pre-existing codebase from a software developer that has left my company. I've downloaded the source code from the repository. When I attempt to build the project, I get an error that says:
The type or namespace name 'Diagnostics' does not exist in the namespace 'Microsoft.WindowsAzure' (are you missing an assembly reference?)
I can't figure out how to get this project up-and-running. When I look at the NuGet packages associated with the project, I can see that the Windows Azure Configuration Manager and Windows Azure Storage packages are already installed. I'm not sure what I'm missing though.
Can someone tell me what I need to install on my machine to get past this error? Thanks!
I recently had this error. The problem was that the project was referencing Framework 3.5 and I have the 2.4 SDK installed which targets 4.0. Upgrade your project to target 4.0 and you should be fine.
I was getting this error on Visual Studio 2015 Update 3. This project's Azure Tools verion is 2.9.
I resolved this error by right clicking References under the project that has the error, then clicking Add Reference, then click Extensions under Assemblies. Find Microsoft.WindowsAzure.Diagnostics, check the box, and click OK. Now try rebuilding your project and hope for a different error.
The assembly should exist on your computer here: C:\Program Files\Microsoft SDKs\Azure.NET SDK\v2.9\bin\plugins\Diagnostics\Microsoft.WindowsAzure.Diagnostics.dll
If you do not see this assembly, it's most likely because you do not have the required Azure SDK. If you are using Azure SDK v2.9 like I am, you can download the SDKs here: Microsoft Azure SDK for .NET - 2.9
Then click download and select:
MicrosoftAzureLibsForNet-x64.msi (Microsoft Azure Client Libraries for .NET)
MicrosoftAzureTools.VS.140 (Microsoft Azure Tools for Microsoft Visual Studio 2015)
If you are using Azure SDK v2.7 then you will want to use this link: Microsoft Azure SDK for .NET - 2.7
In my Visual Studio 2013 RC project, I'm getting this err msg:
"The type 'System.Net.Http.Formatting.MediaTypeFormatter' is defined
in an assembly that is not referenced. You must add a reference to
assembly 'System.Net.Http.Formatting, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35'"
...on the "var response = " line of code in a Controller:
public HttpResponseMessage PostDelivery(Delivery delivery)
{
delivery = repository.Add(delivery);
var response = Request.CreateResponse<Delivery>(HttpStatusCode.Created, delivery);
string uri = Url.Link("DefaultApi", new { id = delivery.Id });
response.Headers.Location = new Uri(uri);
return response;
}
Searching my hard drive for the required assembly ("System.Net.Http.Formatting"), it shows me several locations where it exists, but they are all within existing projects, as is seen here:
Surely there is another location from which System.Net.Http.Formatting.dll can be referenced! But where?
UPDATE
Trying to follow the clue here: http://www.nuget.org/packages/System.Net.Http.Formatting
IOW, by selecting Tools > Library Package Manager > Package Manager Console, and entering:
Install-Package System.Net.Http.Formatting -Version 4.0.20710
...I see the red bulls of Pamplona (not the beverage) descending wild-eyed upon me:
UPDATE 2
I added the System.Net.Http.Formatting.dll from here:
C:\Users\clay\My Documents\Visual Studio 2013\Projects\MvcApplication1\MvcApplication1\bin
...and it now compiles and runs and works as expected, but that is obviously "not the preferred method"
I had the same problem. I used Microsoft Asp Net WebApi Client 4.0.20710 and it worked for me.
Type the following command into Tools > Library Package Manager > Package Manager Console:
Install-Package Microsoft.AspNet.WebApi.Client -Version 4.0.20710
Adding to what Luiz answered above.
System.Net.Http.Formatting is a library and is used for media type formatting. For example:
http://msdn.microsoft.com/en-us/library/system.net.http.formatting.jsonmediatypeformatter(v=vs.118).aspx
When referencing it, when I tried, I was looking to add a reference in my project and was looking in the Assemblies/Framework folder in Reference Manager.
It is actually in the Assemblies/Extensions folder in Reference Manager
If you got an error trying to install System.Net.Http.Formatting -Version 4.0.20710, try this one:
Install-Package WebApiDoodle.Net.Http.Formatting -Pre
I just found on NuGet: https://www.nuget.org/packages/WebApiDoodle.Net.Http.Formatting/3.0.0-pre01
Right click on project and click Add a reference option, then go to Extensions from
Assemblies tab and choose System.Net.Http.Formatting.
If it is no in here you have to manually add in prgramme files-> Microsoft ASP.NET
One other simple option for resolving this is to right click on references, click 'Manage NuGet References', Browse for 'Microsoft.AspNet.WebApi.Client' and install it or perhaps reinstall it. Review the package information to learn more.
I ran into the same problem on vs2022 v16.11.5.
I was fortunate enough to have the project working on one machine but not another. On the suspect machine, under project References, System.Net.Http.Formatting could not be found. Running the visual studio installer app and modifying the vs2022 install to include the ASP.NET and web development package fixed me up.
ASP.NET and Web development Install image
I'm trying to create simple DataAccess portable class library for 3 platforms (ios, android, wp7.5).
All I want is to create webrequests, convert data and return it to UI of each platform.
I was able to create library like this (portable) under Mac OS X Xamarin Studio and successfully used it at iPhone app.
But then I opened this solution under Visual Studio (to add Windows Phone UI project) it gave me build error with description that it couldn't find System.Net namespace.
When I checked portable class targets I was surprised to see there even XBOX selected:
When I selected correct targets (MonoDroid/Monotouch/WindowsPhone7.5) I was able to compile but when I start the app I received the following error:
"c:\Downloads\Noname.CrossXam\Noname.CrossXam\Noname.CrossXam.iPhone\Noname.CrossXam.iPhone.csproj"
(_RemoteBuild target) (1) -> (_ResolveAssemblies target) ->
C:\Program Files
(x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(68,3):
error : Exception while loading assemblies:
System.IO.FileNotFoundException: Could not load assembly 'System.Net,
Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
Perhaps it doesn't exist in the MonoTouch profile? ...
0 Warning(s)
1 Error(s)
Same code (same solution) works just fine under Mac OS X with Xamarin Studio.
Sample solution is here:
https://dl.dropboxusercontent.com/u/19503836/Noname.CrossXam.zip
Please advise.
The issue was in System.Net.dll assembly which is not exists under MonoTouch & MonoAndroid profiles. But that classes are implemented at System.dll under those profile and to make it work you need TypeForwardedToAttribute.
All that type forwarding configuration exists at MVVMCross nuget package which I was able to install only after updating nuget (the last comment from this post: http://slodge.blogspot.com/2013/04/my-current-pcl-setup-in-visual-studio.html)
So there were two issues:
1. Old nuget package manager (update is required)
2. TypeForwardedToAttribute configuration (exists at MvvmCross)
Hope it will be useful for someone.
Have you tried to change target framework to .Net 4.5? You should see Profile104 in your .csproj file
In one of my project i have used reportviewer control to display reports on web pages and at time of uploading on Azure I have followed the steps mentioned here
After uploading when i runs that report web page then it's giving me below error
An error occurred during local report processing.
The definition of the report 'Reports\Report1.rdlc' is invalid.
An unexpected error occurred in Report Processing.
Could not load file or assembly 'Microsoft.ReportViewer.ProcessingObjectModel, >
Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The system cannot find the file specified.
What should be cause of this?
Update:
I have added following 2 dlls as shown in below snap
Microsoft.ReportViewer.Common.dll (10.0)
Microsoft.ReportViewer.WebForms.dll (10.0)
After long research i found solution of my problem from this link
The problem with missing reference of below dlls
Microsoft.ReportViewer.ProcessingObjectModel.dll
Microsoft.RevportViewer.DataVisualization.dll
but after instaling i could not found those dlls in C:\Windows\Microsoft.NET\assembly\GAC_MSIL
But there is assembly files available in this path C:\Windows\assembly
then i have added those dlls using VS2010 directly as shown in below fig.
And it's worked!
What is the version of ReportViewer you have used in this project and would you please specify how many and which one Reference DLL you have included in your project? This will help to ensure that you have included all the DLL properly in your project. You must use Report Viewer SP1 which is compatible with Azure DB, and the same SP1 language pack.
I would suggest FTP to your website and verify that you do have all the DLL uploaded correctly as you configure in your project. This is the best way to check in Windows Azure Websites if all the configured files made it to file server.