I am having a hard time referencing the SignalR in my ASP.Net (4.5) application that I run on Mono (Linux Ubuntu). When I tries to add SignalR from nuget packages, then I get the following error: "Could not install package 'jQuery 1.6.4'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author." Then I tried to install SignalR from source. I followed the instruction given on this page https://github.com/SignalR/SignalR to install SignalR. After that, I created a sample project as described here: https://learn.microsoft.com/en-us/aspnet/signalr/overview/getting-started/tutorial-getting-started-with-signalr#setup. However, when I open my browser it says that could not be found (this is the script referenced in my index.html file). I couldn't find that file, it seems this file is autogenerated. I am really stuck on this issue, not sure how to resolve it.
Not sure what I am doing wrong. I followed the same tutorial (https://learn.microsoft.com/en-us/aspnet/signalr/overview/getting-started/tutorial-getting-started-with-signalr#setup) on windows and it worked fine.
Related
We use our own Azure Artifacts instance to provide a private Nuget feed. It has a default setup, with the #Local view as the default view.
After updating a project on one of the developer machines from dotnet core 3.x to 5.0 all went fine on the dev machine. But then other developers started getting problems with restoring packages.
These developers tried dotnet nuget locals all -c then dotnet clean && dotnet restore after making sure they have the correct SDK installed (5.0). But the Azure Artifacts server cannot provide the correct package version, specifically;
error NU1102: Unable to find package Microsoft.AspNetCore.App.Ref with version (= 5.0.0)
I am aware that this package is an "internal package" in dotnet, and I have confirmed that it is not explicitly defined as a dependency in the projects that reports errors. It is some sort of implicit dependency.
I am also aware of that Microsoft says that one must add packages to a private feed that one wants the consumers of the feed to have available.
How can I possibly add such an "internal package" to the Nuget feed, when it is not meant to be consumed explicitly?
Why cannot Microsoft query a upstream package source when the requested package is not found in the private feed? (the 5.0.0 package version actually exists on nuget!)
How come that I do not have to download such a package myself when running dotnet restore, but my peers have to? (and fails at it, even though their dev environment is similar to mine)
I have ASP.NET MVC 5 application with .NET 4.5.1. The application is having issue as described in this SO post.
So as per the suggestion i am trying to install https://github.com/Sustainsys/owin-cookie-saver nuget package However i am getting error
Severity Code Description Project File Line Suppression State
Error Could not install package 'Kentor.OwinCookieSaver 1.1.1'. You
are trying to install this package into a project that targets
'.NETFramework,Version=v4.5.1', but the package does not contain any
assembly references or content files that are compatible with that
framework. For more information, contact the package author. 0
any idea?
Right now, the ASP.NET MVC 5 app you have is targeting .NET 4.5.1. No surprise there. The error says "You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.1', but the package does not contain any assembly references or content files that are compatible with that framework."
The highlighted line indicates that the package you are trying to install is not built for .NET 4.5.1. I went ahead and downloaded the package itself (from NuGet.org). The package is currently targeting .NET 4.5.2. So if you change your target framework to .NET 4.5.2 and try to install, you will find it works out for you.
Ideally, packages available to the public would be built for a wider range of Target Frameworks but occasionally I do run into this. If you run into this again, go grab the package from the previous link (see the Manual Download on the right hand side of the page). Open up the .nupkg using 7-zip and open up the lib folder. There you will find what frameworks it is targeting and can adjust accordingly (or decide to try another package if you can't change).
I've got a problem with 'dnu restore' command in Ubuntu 15 trying to build an ASP.NET 5 application. If I add SignalR to dependencies in project.json, no JS scripts are added to my project directory. Visual Studio Code continues asking me to restore packages. The same situation with jQuery (yes, I know it's better to use Bower for it's installation). I've tried running command with '--no-cache' parameter and adding SignalR-Client dependency, but scripts are still not added. It seems like Server-side libs are installed successfully (project builds and runs when I inherit from SignalR Hub class, the only problem VS Code does not recognize installed namespaces and classes). Is it possible to fix it or should I manually download JS files?
I've found the reason. ASP.NET 5 packaging system is new for me so I didn't know how to use it properly. DNX doesn't know how to install client libraries at all. It places all the installed packages into a special directory shared by all projects. In order to install client packages Bower should be used (it is easy to add - just add a dependency in project.json and create a configuration file). By the way SignalR has it's own Bower package as well as jQuery (but this is obvious).
I read about Web API having its own TraceWriter implementation with 2012.2, for example here, among other sources.
I am now using VS2013 with .NET 4.5.1 and the EnableSystemDiagnosticsTracing is nowhere to be found. It's meant to be defined in the HttpConfigurationTracingExtensions class which resides in the System.Web.Http.Tracing.dll. However, this assembly is nowhere to be found - not in list of assemblies in the Add Reference dialog, not in GAC.
Where is this assembly supposed to come from? Docs say it's part of .NET Framework 4, which I have installed. Also installed the ASP.NET Web API 2 Tracing 5.0.0 NuGet package. Is there some update? Should I re-install .NET Framework?
I know it's not a big deal to implement ITraceWriter myself but it bothers me not to know what happened with the built-in implementation.
Just install needed NuGet Package
Install-Package Microsoft.AspNet.WebApi.Tracing -Version 5.0.0
It's a little bit strange, but it is the right package
http://www.nuget.org/packages/microsoft.aspnet.webapi.tracing
If you installed the Tracing 5.0.0 NuGet package, it should be correctly included in your project. The moment it is installed, I believe a separate text file should open in VS showing the code you should include in your WebApiConfig.cs file.
I haven't created a Web API 2 project from scratch (only upgraded from pre-5.0 to 5.0 projects), but this is the code that should reside in your WebApiConfig.cs file:
// To disable tracing in your application, please comment out or remove the following line of code
// For more information, refer to: http://www.asp.net/web-api
config.EnableSystemDiagnosticsTracing();
And that should be it, if the package is installed correctly, tracing should now be used in your project.
I have a perfectly working windows forms C# .NET 4 application that uses a SQLite3 database file to store data and display forms.
When I deploy my app on any machine other then the dev machine, I get an exception thrown and it's message is "Could not load assembly System.Data.SQLite.dll or one of its dependencies. The specified module could not be found."
The System.Data.SQLite.dll reference in the project is set to Copy Local = True. Also, I tried manually loading the assembly with Assembly.LoadFile. The dll is placed in the output directory. I also tried setting the platform target to Any CPU as well as x86, no difference. All machines I am working with are 32-bit. What is the issue here? Why is my application trying to load the assembly and can't find it?
Thanks!
I had the same problem after publishing my program to a separate computer. Installing Microsoft Visual C++ 2010 Redistributable Package (x86) on the separate computer fixed the problem.
Note: the separate computer already had Microsoft Visual C++ 2010 Redistributable Package (x64) installed, the x86 version was needed.
'System.Data.SQLite.dll" requires "msvcr100.dll" which is one of it's Dependencies. This will be available only if you installed latest "Microsoft Visual C++ Redistributable" or any other product which internally provides this.
For example, VS2010 will install C++ Redistributable by default. Thats the reason your application doesnot works in some machine but works in others.
You could try pasting the "msvcr100.dll" in your application bin folder and distribute if you dont want to install VC++ 2010 Redist in all the PC's.
Some of the System.Data.Sqlite.dll modules depend on the "Microsoft Visual C++ 2012 Redistributable Package" .
You can find required dependencies on the official download page : http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
The answers already given didn't solve my problem. I tried to deploy to a VMware server. The solution that did help where given here: http://sqlite.1065341.n5.nabble.com/System-Data-SQLite-Deployment-Mystery-td71752.html Two methods are described there.
When i install this sqlite-netFx45-setup-bundle-x86-2012-1.0.88.0.exe, my app is able to find the right dll.
The second method is to add the dll to de app.exe.config in the debug or release dir. If you edit this file directly, there is a change VC will overwrite the file.
My main problem was that i installed the sqlite package manually. I didn't use NuGet, because i'm behind a proxy. If you do use Nuget, the information in the app.exe.config will be provided automatically.
Using NuGet behind a proxy is described here: NuGet Behind Proxy