I'm starting off with SpecFlow to test my Azure Data Factory pipelines. I'm using VS 2019 & .NET Framework 4.7.2. When I try to run my test, it starts executing and then completes instantaneously. I've also observed that it doesn't hit the breakpoints which I've placed in the feature file as well as in the binding. This is my packages.config file:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Azure.Management.DataFactory" version="4.8.0" targetFramework="net472" />
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="5.2.7" targetFramework="net472" />
<package id="Microsoft.NET.Test.Sdk" version="15.0.0" targetFramework="net472" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.20" targetFramework="net472" />
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.19" targetFramework="net472" />
<package id="Microsoft.TestPlatform.TestHost" version="15.0.0" targetFramework="net472" />
<package id="MSTest.TestAdapter" version="1.3.2" targetFramework="net472" />
<package id="MSTest.TestFramework" version="1.3.2" targetFramework="net472" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net472" />
<package id="SpecFlow" version="2.4.0" targetFramework="net472" />
<package id="SpecRun.Runner" version="3.2.22" targetFramework="net472" />
<package id="SpecRun.SpecFlow.2-4-0" version="3.2.22" targetFramework="net472" />
<package id="System.IO" version="4.3.0" targetFramework="net472" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net472" />
<package id="System.Runtime" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net472" />
<package id="System.ValueTuple" version="4.3.0" targetFramework="net472" />
</packages>
When I checked my log file, I could find this line in the log file that got generated: No tests executed (activation needed). Can someone please tell me where I'm going wrong here? Note that my solution is building properly.
PFB the entire log for your reference:
2020-04-21T23:25:19.8268118+05:30;VSTestExecutionThread;Info;SpecFlow+Runner execution started
2020-04-21T23:25:19.8268118+05:30;VSTestExecutionThread;Info;SpecFlow+Runner 3.2.22 in Framework clr40 in x86 mode execution started
2020-04-21T23:25:19.8268118+05:30;VSTestExecutionThread;Info;TestAdapter Location: C:\Users\ddc\source\repos\ADF.UnitTest\packages\SpecRun.Runner.3.2.22\tools\net45\TechTalk.SpecRun.VisualStudio.TestAdapter.dll
2020-04-21T23:25:20.0532065+05:30;VSTestExecutionThread;Info;SpecRun: running tests in C:\Users\ddc\source\repos\ADF.UnitTest\ADF.UnitTest\bin\Debug\ADF.UnitTest.dll
2020-04-21T23:25:20.0532065+05:30;VSTestExecutionThread;Info;Output folder configured to "C:\Users\ddc\source\repos\ADF.UnitTest\TestResults" (default)
2020-04-21T23:25:20.0542043+05:30;VSTestExecutionThread;Info;Profile: ADF.UnitTest
2020-04-21T23:25:20.1309989+05:30;VSTestExecutionThread;Info;Log file path: C:\Users\ddc\source\repos\ADF.UnitTest\TestResults\ADF.UnitTest_ADF.UnitTest_2020-04-21T232520.log
2020-04-21T23:25:20.1429665+05:30;Thread#14;Info;Checking activation
2020-04-21T23:25:21.6090483+05:30;Thread#14;Error;No tests executed (activation needed)
2020-04-21T23:25:21.6339842+05:30:Total: 0
2020-04-21T23:25:21.6369734+05:30:Succeeded: 0
2020-04-21T23:25:21.6369734+05:30:Ignored: 0
2020-04-21T23:25:21.6369734+05:30:Pending: 0
2020-04-21T23:25:21.6379706+05:30:Skipped: 0
2020-04-21T23:25:21.6379706+05:30:Failed: 0
2020-04-21T23:25:21.6449520+05:30;VSTestExecutionThread;Info;Adding attachments to VSTest
========== End of log file ==========
I had the same issue pop up when I updated my SpecFlow NuGet packages. SpecFlow now requires you to setup an account via a Microsoft account.
Check the Output from the tests in Visual Studio and there should be a link to activate an account. See the documentation here: https://specflow.org/2020/introducing-the-specflow-account/
Related
I can use C# and NpgSQL to connect to a PostgreSQL 12 instance. However when I use the same exact code to connect to a PostgreSQL 11 instance I get an exception. Object reference not set to an instance of an object. This is from line 1708 of NpgsqlConnector.cs (from disassembly).
The packages in my solution are as follows:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Bcl.AsyncInterfaces" version="1.1.1" targetFramework="net471" />
<package id="Npgsql" version="4.1.3.1" targetFramework="net471" />
<package id="System.Buffers" version="4.5.0" targetFramework="net471" />
<package id="System.Memory" version="4.5.3" targetFramework="net471" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net471" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.7.1" targetFramework="net471" />
<package id="System.Text.Encodings.Web" version="4.6.0" targetFramework="net471" />
<package id="System.Text.Json" version="4.6.0" targetFramework="net471" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net471" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net471" />
<package id="Teradata.Client.Provider" version="16.20.9" targetFramework="net471" />
</packages>
Unfortunately it was mostly my lack of experience with PostgreSQL.
I was lacking a pg_hba.conf entry for the machine I was trying to connect from. The error message was NOT very helpful...
I upgraded my C# project from .Net 4.6.2 to 4.8. I also took the time to update all my NuGet packages.
There is one package, NuGet.Core, which I believe Microsoft installed. This package now has a warning:
NuGet.Core
Installed: 2.14.0 / Version: 2.14.0 (Deprecated)
This package has been deprecated as it is legacy and no longer maintained.
If I attempt to uninstall the package, I see that other Microsoft packages depend on it, which makes sense ans the Description for this package states: NuGet.Core is the core framework assembly for NuGet that the rest of NuGet builds upon.
So what does Microsoft want from me? I cannot uninstall the package, nor do I get a directive as to what to uninstall that replaces it.
I did a Google search and nothing comes up. I guess the problem is still to new.
Environment
Visual Studio 16.3.1 (Visual Studio Enterprise 2019)
Target framework: .Net Framework 4.8
Update:
My project is a C# WinForms project.
I have 59 or so NuGet packages. Most of the packages appear to be Microsoft in origin. I installed a few of them, true.
Error Unable to uninstall 'NuGet.Core.2.14.0' because 'Signature.Core.1.0.1' depends on it.
Contents of package.config:
<package id="AlphaFS" version="2.2.6" targetFramework="net48" />
<package id="AlphaVSS" version="1.4.0" targetFramework="net48" />
<package id="Auth0.OidcClient.Core" version="2.4.2" targetFramework="net48" />
<package id="Auth0.OidcClient.WinForms" version="2.4.2" targetFramework="net48" />
<package id="BouncyCastle" version="1.8.5" targetFramework="net48" />
<package id="EntityFramework" version="6.3.0" targetFramework="net48" />
<package id="Google.Protobuf" version="3.9.2" targetFramework="net48" />
<package id="IdentityModel" version="4.0.0" targetFramework="net48" />
<package id="IdentityModel.OidcClient" version="2.9.0" targetFramework="net48" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net48" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net48" />
<package id="Microsoft.Extensions.Configuration" version="3.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.Configuration.Abstractions" version="3.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.Configuration.Binder" version="3.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.DependencyInjection" version="3.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="3.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.Logging" version="3.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="3.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.Options" version="3.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.Primitives" version="3.0.0" targetFramework="net48" />
<package id="Microsoft.Graph" version="1.17.0" targetFramework="net48" />
<package id="Microsoft.Graph.Core" version="1.17.0" targetFramework="net48" />
<package id="Microsoft.IdentityModel.JsonWebTokens" version="5.5.0" targetFramework="net48" />
<package id="Microsoft.IdentityModel.Logging" version="5.5.0" targetFramework="net48" />
<package id="Microsoft.IdentityModel.Tokens" version="5.5.0" targetFramework="net48" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net48" />
<package id="Microsoft.NETCore.Platforms" version="3.0.0" targetFramework="net48" />
<package id="Microsoft.PowerShell.5.ReferenceAssemblies" version="1.1.0" targetFramework="net48" />
<package id="Microsoft.Web.Xdt" version="3.0.0" targetFramework="net48" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net48" />
<package id="Mono.Cecil" version="0.11.0" targetFramework="net48" />
<package id="MySql.Data" version="8.0.17" targetFramework="net48" />
<package id="NETStandard.Library" version="2.0.3" targetFramework="net48" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net48" />
<package id="NuGet.Core" version="2.14.0" targetFramework="net48" />
<package id="ObjectListView.Official" version="2.9.1" targetFramework="net48" />
<package id="Signature.Core" version="1.0.1.0" targetFramework="net48" />
<package id="SSH.NET" version="2016.1.0" targetFramework="net48" />
<package id="StrongNamer" version="0.0.8" targetFramework="net48" />
<package id="System.AppContext" version="4.3.0" targetFramework="net48" />
<package id="System.Buffers" version="4.5.0" targetFramework="net48" />
<package id="System.Collections" version="4.3.0" targetFramework="net48" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net48" />
<package id="System.ComponentModel" version="4.3.0" targetFramework="net48" />
<package id="System.ComponentModel.Annotations" version="4.6.0" targetFramework="net48" />
<package id="System.Console" version="4.3.1" targetFramework="net48" />
<package id="System.Data.SQLite" version="1.0.111.0" targetFramework="net48" />
<package id="System.Data.SQLite.Core" version="1.0.111.0" targetFramework="net48" />
<package id="System.Data.SQLite.EF6" version="1.0.111.0" targetFramework="net48" />
<package id="System.Data.SQLite.Linq" version="1.0.111.0" targetFramework="net48" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net48" />
<package id="System.Diagnostics.DiagnosticSource" version="4.6.0" targetFramework="net48" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net48" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net48" />
<package id="System.Globalization" version="4.3.0" targetFramework="net48" />
<package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net48" />
<package id="System.IdentityModel.Tokens.Jwt" version="5.5.0" targetFramework="net48" />
<package id="System.IO" version="4.3.0" targetFramework="net48" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net48" />
<package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net48" />
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="net48" />
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Linq" version="4.3.0" targetFramework="net48" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net48" />
<package id="System.Memory" version="4.5.3" targetFramework="net48" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net48" />
<package id="System.Net.Primitives" version="4.3.1" targetFramework="net48" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="net48" />
<package id="System.Reflection" version="4.3.0" targetFramework="net48" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net48" />
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime" version="4.3.1" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net48" />
<package id="System.Runtime.Extensions" version="4.3.1" targetFramework="net48" />
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net48" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net48" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net48" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net48" />
<package id="System.Text.Encodings.Web" version="4.6.0" targetFramework="net48" />
<package id="System.Text.RegularExpressions" version="4.3.1" targetFramework="net48" />
<package id="System.Threading" version="4.3.0" targetFramework="net48" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net48" />
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net48" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
<package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="net48" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net48" />
My guess is that Visual Studio 20XX installed a lot of them, when I selected the WinForms project. Another option is adding controls, whatever the situation most of the items are the .Net Framework.
Okay, more information.
Signature.Core
Core functions to allow signing a Nuget package after building.
It is possible that I added this package years ago now that I think about it to allow for signing. I might have run into a signed package on installation. Too much time elapsed since I first created this project. I can remove Signature.Core and see if that depends on something further up the food chain.
Thoughts?
NuGet.Core: This package has been deprecated as it is legacy and no
longer maintained
When the author of one package will no longer maintain the package, he can deprecate it. As for Nuget.Core package, it's once part of NuGet client v2 APIs. Now they have been replaced by NuGet client v3 and later APIs. See additional details here.
According to your details, you should use Signature.Core package for signing several years ago, since this package depends on these three packages:
When we try to install the Signature.Core package, package manager will install these three packages first if they do not exist in current project. So maybe the reason why you have Nuget.Core installed is because you installed the Signature.Core package, whose author is Maarten Balliauw.
Error Unable to uninstall 'NuGet.Core.2.14.0' because
'Signature.Core.1.0.1' depends on it.
In this situation, it's expected behavior that you get this message. Cause the Signature.Core is installed, and it depends on Nuget.Core package. Apart from Nuget.Core package, you'll get similar message when you try to uninstall Mono.Cecli before uninstalling the Signature.Core like:
So if you don't need the Signature.Core package any more, you can feel free to uninstall it,as well as those three packages(Nuget.Core,Mono.Cecil,Microsoft.Web.Xdt), just take care if other packages depend on them.
General
I am developing a mobile application using the Xamarin framework. The project is quite large and uses several nuget packages.
Environment
Xamarin.Forms v2.5.0.122203
Xamarin for VS2015 4.9.0.753
Visual Studio Professional 2015
Mono.Android v6
Target framework Android 6.0 (Marshmallow)
Minimum Android version 4.4.87 (API 20 - Kit Kat)
Suddenly after installing some packages (I can't remember which one) I get the following error
Exception while loading assemblies: System.IO.FileNotFoundException:
Could not load assembly 'System.Web, Version=4.0.0.0'
It seems like a package uses System.Web.
So I thought I could just add the reference from here
C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework.NETFramework\vX.X
The project is compiling and starting. But instantly after starting the app on my tablet, it crashes.
Debug output
04-24 10:30:02.924 D/Mono (26732): Assembly Loader probing
location: 'System.Web'.
04-24 10:30:02.924 F/monodroid-assembly(26732): Could not load
assembly 'System.Web' during startup registration.
04-24 10:30:02.924 F/monodroid-assembly(26732): This might be due to
an invalid debug installation.
04-24 10:30:02.924 F/monodroid-assembly(26732): A common cause is to
'adb install' the app directly instead of doing from the IDE.
I don't assume anyone has a clear solution for this. Is there a tool which tells me, what package references System.Web?
Thanks in advance!
packages.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Acr.UserDialogs" version="6.3.8" targetFramework="portable46-net451+win81" />
<package id="ExifLib.PCL" version="1.0.1" targetFramework="portable46-net451+win81" />
<package id="FAKE" version="4.35.0" targetFramework="portable46-net451+win81" />
<package id="FluentValidation" version="6.2.1.0" targetFramework="portable46-net451+win81" />
<package id="HWebbuilder.Enum" version="0.2.3" targetFramework="portable46-net451+win81" />
<package id="HWebbuilder.HCirsSmart.Shared" version="0.1.5" targetFramework="portable46-net451+win81" />
<package id="HWebbuilder.Interface" version="0.1.12" targetFramework="portable46-net451+win81" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="portable45-net45+win8+wp8+wpa81" requireReinstallation="true" />
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="Microsoft.CSharp" version="4.0.1" targetFramework="portable46-net451+win81" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="portable46-net451+win81" />
<package id="NControl" version="0.9.1.0" targetFramework="portable46-net451+win81" />
<package id="NControl.Controls" version="0.9.3.3" targetFramework="portable46-net451+win81" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="portable46-net451+win81" />
<package id="NGraphics" version="0.4.0" targetFramework="portable46-net451+win81" />
<package id="Rg.Plugins.Popup" version="1.0.4" targetFramework="portable46-net451+win81" />
<package id="Splat" version="1.6.2" targetFramework="portable46-net451+win81" />
<package id="SQLite.Net.Core-PCL" version="3.1.1" targetFramework="portable46-net451+win81" />
<package id="sqlite-net-pcl" version="1.1.2" targetFramework="portable46-net451+win81" />
<package id="SQLitePCL.bundle_green" version="0.9.2" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="SQLitePCL.raw" version="0.9.2" targetFramework="portable45-net45+win8+wp8+wpa81" requireReinstallation="true" />
<package id="System.Collections" version="4.3.0" targetFramework="portable46-net451+win81" />
<package id="System.Data.Common" version="4.3.0" targetFramework="portable46-net451+win81" />
<package id="System.Dynamic.Runtime" version="4.0.11" targetFramework="portable46-net451+win81" />
<package id="System.Globalization" version="4.3.0" targetFramework="portable46-net451+win81" />
<package id="System.IO" version="4.3.0" targetFramework="portable46-net451+win81" />
<package id="System.Linq" version="4.1.0" targetFramework="portable46-net451+win81" />
<package id="System.Reflection" version="4.1.0" targetFramework="portable46-net451+win81" />
<package id="System.Reflection.Extensions" version="4.0.1" targetFramework="portable46-net451+win81" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="portable46-net451+win81" />
<package id="System.Runtime" version="4.3.0" targetFramework="portable46-net451+win81" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="portable46-net451+win81" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="portable46-net451+win81" />
<package id="System.Threading" version="4.0.11" targetFramework="portable46-net451+win81" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="portable46-net451+win81" />
<package id="Xamarin.Forms" version="2.5.0.122203" targetFramework="portable46-net451+win81" />
<package id="XLabs.Core" version="2.0.5782" targetFramework="portable46-net451+win81" />
<package id="XLabs.Forms" version="2.0.5782" targetFramework="portable46-net451+win81" />
<package id="XLabs.IoC" version="2.0.5782" targetFramework="portable46-net451+win81" />
<package id="XLabs.Platform" version="2.0.5782" targetFramework="portable46-net451+win81" />
<package id="XLabs.Serialization" version="2.0.5782" targetFramework="portable46-net451+win81" />
<package id="ZXing.Net.Mobile" version="2.4.1" targetFramework="portable46-net451+win81" />
<package id="ZXing.Net.Mobile.Forms" version="2.4.1" targetFramework="portable46-net451+win81" />
</packages>
The 'HWebbuilder'-packages are custom private packages. They do not contain a reference to System.Web. I doublechecked it.
To anyone having similar problems, use ILSpy to analyze your assemblies! Great tool!
My development machine has .gitignore file, and none of the javascript files in the Scripts folder is checked in to our git repository on TFS. Everything work fine in the folder on my machine where it was developed orginally. When I clone it to another folder on my machine, or clone it from anther workstation, then compile, it compiled successfully. However, none of the javascript is restored during the compilation. The package.config has the reference to the javascript and version.
There is also another problem that some javascript no longer exist in nuget.org. How do I restore those files? Thanks.
<?xml version="1.0" encoding="utf-8" ?>
<packages>
<package id="AjaxControlToolkit" version="16.1.1.0" targetFramework="net461" />
<package id="AjaxMin" version="5.14.5506.26202" targetFramework="net452" />
<package id="angularjs" version="1.5.8" targetFramework="net461" />
<package id="AngularJS.Core" version="1.5.8" targetFramework="net461" />
<package id="AngularJS.Resource" version="1.5.8" targetFramework="net461" />
<package id="Antlr" version="3.5.0.2" targetFramework="net452" />
<package id="bootstrap" version="3.3.7" targetFramework="net452" />
<package id="colorbox" version="1.4.29" targetFramework="net461" />
<package id="elmah" version="1.2.2" targetFramework="net451" />
<package id="elmah.corelibrary" version="1.2.2" targetFramework="net451" />
<package id="EntityFramework" version="6.1.3" targetFramework="net452" />
<package id="FontAwesome" version="4.7.0" targetFramework="net461" />
<package id="iTextSharp" version="5.5.10" targetFramework="net461" />
<package id="jQuery" version="3.1.1" targetFramework="net461" />
<package id="jQuery.UI.Combined" version="1.12.1" targetFramework="net461" />
<package id="jQuery.Validation" version="1.15.1" targetFramework="net461" />
<package id="json2" version="1.0.2" targetFramework="net461" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net452" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net451" />
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net452" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net451" />
<package id="Modernizr" version="2.8.3" targetFramework="net452" />
<package id="MySql.Data" version="6.9.9" targetFramework="net461" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" />
<package id="Nwic.Web.MainMenu" version="1.0.2" targetFramework="net45" />
<package id="SlowCheetah" version="2.5.15" targetFramework="net452" />
<package id="Spin.js" version="2.3.2.1" targetFramework="net461" />
<package id="VisualStudioGitIgnore" version="1.3.0.0" targetFramework="net45" />
<package id="WebGrease" version="1.6.0" targetFramework="net451" />
</packages>
Because your javascript files in Script folder isn’t checked into Git repository, when you clone the repository to another place, the javascript files won’t be included in that project. When compile your project, it only download/restore the javascript files to the “packages” folder and won’t add them to your project.
Run this command in Package Manager Console to reinstall your packages.
Update-Package –reinstall packageName
I have a MVC project with OAuth authentication, every time I try to debug the project i get a FileLoadException upon configuring the IAppBuilder. I have installed version 3.0.1 of Microsoft.Owin.Security.Oauth using the PMC but I guess somewhere still lies a reference to an older version of the package because...
This is the exception:
This is where it is thrown:
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app); //Exception is thrown here
}
}
This is my packages.config:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Antlr" version="3.4.1.9004" targetFramework="net45" />
<package id="CommonServiceLocator" version="1.3" targetFramework="net45" />
<package id="EntityFramework" version="6.0.0" targetFramework="net45" />
<package id="jQuery" version="1.10.2" targetFramework="net45" />
<package id="jQuery.Validation" version="1.11.1" targetFramework="net45" />
<package id="log4net" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.Core" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.EntityFramework" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.Owin" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="5.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.1" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi" version="5.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.HelpPage" version="5.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Owin" version="5.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.0.0" targetFramework="net45" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.Cookies" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.Google" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Modernizr" version="2.6.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="Unity" version="3.5.1404.0" targetFramework="net45" />
<package id="WebGrease" version="1.6.0" targetFramework="net45" />
</packages>
I tried adding binding redirect as such:
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" PublicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-3.0.1.0" newVersion="3.0.1.0"/>
</dependentAssembly>
Can´t understand why this doesn´t work, does Visual Studio make a difference between 3.0.1 and 3.0.1.0?
I tried removing obj and bin folders, cleaning projects and rebuilding them.
I tried deleting all nuget packages and restoring them.
I tried reinstalling all Owin packages.
I´ve used Agent Ransack to search my entire source directory for any file containing Microsoft.Owin.Security.OAuth but found no references to version 2.0.0.0 or any other version besides the correct 3.0.1.0.
I´m stuck, any ideas?
Ok, so just in case anyone else ends up with this problem;
The problem was that the Microsoft.AspNet.Identity.Owin package is depending on Microsoft.Owin.Security.OAuth and there was a mismatch in version.
<package id="Microsoft.AspNet.Identity.Core" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.EntityFramework" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.Owin" version="1.0.0" targetFramework="net45" />
Apparently, even though Microsoft.AspNet.Identity.Owin requires >= v2.0 of Microsoft.Owin.Security.OAuth, having v3+ of Microsoft.Owin.Security.OAuth will break the compatibility (major version inconsistency).
After I had updated Microsoft.AspNet.Identity.Owin package and its adjacent family members Microsoft.AspNet.Identity.EntityFramework and Microsoft.AspNet.Identity.Core I removed all packages, bin and obj folders and rebuilt solution. Voila!
A tip to the VS2013+ Ultimate user is to use the NuGet Package Visualizer when exploring package dependencies.
Check your references. Remove the Microsoft.Owin.Security.OAuth from everywhere, then restore all nuget packages.