Not able to add .net assemblies in Test Partner Tool - .net-framework-version

We have automated an application using Test Partner 6. We have a grid in the application which has the class name "GUIObject("ClassName=WindowsForms10.Window.8.app.0.15a303f_r38_ad1 Caption='' Index=18")". We create a object of this and get the column titles.
Now we have an upgrade of the application. We are able to create the object but its an empty object. When we try to do any operation on it it throws error "invalid procedure call or arguement'. We tried adding the .Net reference and assemblies. But getting the error "This is an invalid .net assembly"
This works well with older version of application, but not new. Dot Net framework 4.5 is installed in our machine.
Any help appreciated.

Related

how to use EF6.0 in .netframework 4.6.2 class library project referenced inside ASPNET Core 2.0 project

I am trying to use EF6.0 in Class Library Project .Net Framework 4.6.2 (Repository project) where the DBContext live next to the repository and the Entities have been created in different project(.NET framework 4.6.2) using Reverse Code First POCO,
The Repository will be called thru another (framework 4.6.2) Manager Project referenced inside ASPNET Core 2.0 SPA Project, where StructureMap used as IoC.
The first thing I faced was the issue of passing the connectionstring to the DBContext inside Repository Project, as I want to Register the services (DBContext,Repository) inside the Repository Project not from the ASPNET Core Startup.cs, the reason to that is to avoid exposing the DBContext to the frontend project, anyway I ended up hard-coding the connection string in Repo Project temporarily, "appreciate if there is another way!"
The main issue that I am facing with this design comes when the request send to collect the list of "Products", it reaches to the Repository Project where the Linq statement use _dbcontext.Product , then error message thrown
NotSupportedException: Unable to determine the provider name for provider factory of type 'System.Data.SqlClient.SqlClientFactory'. Make sure that the ADO.NET provider is installed or registered in the application config.
The Entityframework is registered inside Repository project, but not inside ASPNET Core 2.0 Project as it will show Nuget conflict error when its installed in ASPNET Core 2.0.
also I tried to install "System.Data.SqlClient" from Nuget in ASPNET Core2.0 but the error still throwing.
Any Idea on how to use EF6.0 in .netframework 4.6.2 class library project referenced inside ASPNET Core 2.0 project.
The Microsoft article Get Started with ASP.NET Core and Entity Framework 6 has the steps necessary for using Entity Framework 6 from a ASP.NET Core project.
Regarding the NotSupportedException, I would refer to the related question System.NotSupportedException: Unable to determine the provider name for provider factory of type 'System.Data.SqlClient.SqlClientFactory'.
I ran into the same issue because I failed to change the Core .csproj file from <TargetFramework>netcoreapp2.2</TargetFramework> to <TargetFramework>net471</TargetFramework> (which the article told me to do, but for some reason I thought wasn't necessary in Core 2.2).
I provided more explanation and details in the posted explanation/answer to the question I referenced above.

Pack an entire ASP.NET Core 2 App into a Nuget

I am trying to pack an ASP.NET Core 2 App into a Nuget so that I can give this Nuget to another developer, they can create a new Empty ASP.NET Core app and install this Nuget and can run the app and access all the views, etc. (as built in the Nuget).
I tried to pack an app into a Nuget and it works fine. Then, I installed this Nuget into another Empty Web Project, and when I try to run the app, I get the exception:
An unhandled exception occurred while processing the request.
InvalidOperationException: The view 'Index' was not found. The following locations were searched:
/Views/Home/Index.cshtml
/Views/Shared/Index.cshtml
When adding the Nuget, I can see the Views folder created (a replica of what is created in the packed project). However, when running the app, they are not being fetched.
Any idea how to make this work? I need to develop an entire app and share it as a Nuget, so that other developers can add more features, etc.
Thanks

Can't reference an F# class library

This issue is exactly as described in the title.
I have a portable F# class library. I have created an ASP.NET Core Web Application (both .NET Framework and .NET Core), from which I have tried to add a reference to my F# class library.
Trying to add the reference gives a message:
The following projects are not supported as references:
Project type is unsupported by current project and can not (sic) be referenced.
This is extremely disappointing, as the .NET Core is now in General Availability.
Are there any workarounds while this bug gets addressed?
I have a project, which I started with Beta8 bits of .net core and since then I have an F# library, which I use from an asp.net core C# app. (btw here is an RC2 based minimal sample for referencing the F# lib from a net core based console app)
Here is how I did it:
Currently (according to my knowledge) there is no template in VS to create a coreCLR based F# library (the PLC templates under F# are all Full framework based, but that you still cannot reference from asp.net core even if it runs on full framework), so you have to do this with the command line. This is done by:
dotnet new --lang F#
This creates you a hello world coreCLR F# app. You can turn the app into a class library by modifying project.json file.
If you have a VS solution and you click to “Add” -> “Existing project” you can select the project.json file. This way you add it to your solution (and btw. an xproj file will be also created).
So at this point you will have the coreCLR based F# project in your solution. I believe by right clicking the asp.net core project and go to “Add” -> “Reference” -> Projects->Solutions and selecting the F# library you can already reference it. If this does not work, you can do it manually: just list the F# project under the “dependencies” in the project.json of the asp.net core application.
If your asp.net core app runs on full framework still need to do these steps. It actually doesn't really matter.
Now the bad part:
In the RTM (released on Monday) the “dotnet new” command creates an uncompliable F# app, because of some dependency issues. This is tracked here (the title says "on macOS", but it's the same on Windows) and as soon as it’s solved this should be fine (or if you did not yet install RTM and you have RC2 you are also good).
Intellisense and debugging across F# and C# does not work (I posted it here)
Although .NET Core has officially been released, the vast majority of the nuget packages in the ASP.NET Core Web Application are in prerelease. Moreover, although the entity framework identity model has been cleaned up, my attempt to change the key columns for users and roles from strings to ints generated an obscure error when I tried to implement Entity Framework migrations. I know I can do it for a .NET Web Application, even though the process is clunky in places. So for now I have gone back to using a .NET Framework Web Application. I'm looking forward to seeing a fully mature version of ASP.NET Core Web Applications. It's not ready, but it looks very promising.

MvcSiteMapProvider.dll not working in Visual Studio 2013

I have a MVC 2 project created in Visual Studio 2010 that use MvcSiteMapProvider.dll and works fine. But when loading the project in Visual Studio 2013, everything else work fine except it crashes at
Html.MvcSiteMap().SiteMapPath
The error message is
An exception of type 'MvcSiteMapProvider.MvcSiteMapException' occurred in MvcSiteMapProvider.dll but was not handled in user code
I believe that MvcSiteMapProvider.dll cannot be loaded correctly. I need help on this. Thanks.
Note that there is a separate DLL for each .NET framework version, and I suspect you are targeting the wrong framework. This can happen if you install MvcSiteMapProvider into your project and then change it to a different .NET framework version.
NuGet does not automatically upgrade/downgrade packages to the currently set framework version. This step must be done manually. The best way is to completely uninstall and reinstall the package as per this document. Also be sure to read this before attempting it.
But do note that if you do this NuGet will not remove any files you have changed (like Mvc.sitemap) and then prompt you whether to overwrite them. You should normally say no to each prompt to ensure your custom configuration is not overwritten.
Also note that it is not sufficient to use Assembly Binding Redirection with MvcSiteMapProvider because with each .NET framework version we create a separate build (DLL) that takes advantage of features that are not present in prior versions.

Code Analysis with FXCop (issue after upgrading to 4.5)

I am using static code analysis and have my own custom rules.
Recently I migrated the project to VS2013 and after that when I am running the build from Team City its throwing the error saying it cannot load the ruleset...
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information
what could be the reason, also how can I tell the project to use the latest version of FXCOP?
Regards
Amal Thomas

Resources