installing asp.mvc 2 beta nunit project templates untrusted component error - asp.net-mvc-2

I've been trying to get nunit 2.5 to work with mvc 2 (VS2008) after following some guides and updating registries. I though I was done. I can select nunit when choosing my testing frame work but there is no test project created. When I create a new mvcapplication.nunit.tests template it fails with the error.
Error: this template attempted to load an untrusted component 'Microsoft.VisualStudio.Web.Extensions', Version 9.0.0.0 Culture=neutral, PublicKeyToken=31bf3856ad364e35'
I'm a little lost as to where to find the component and how to make it trusted.

I think the best answer at this point is to change the problem...
Use Visual Studio 2010, the MVC3 platform and this plugin via nuget
https://nuget.org/packages/nunit

Related

CRM Trace Logs Showing an Exception

We are debugging a campaign plugin in CRM. We are relying on using the D365 Plugin Trace Log since the the Plugin Profiler is also throwing an error.
We are getting an exception that the Sandbox.Helper DLL is not found.
We have confirmed from the BIN that that DLL is available. We also have tried setting the mode of the plugin to None and Isolated. We have restarted the sandbox asynch service,crmapppool, and the other D365 services in the CRM server.
Check if your plugin assembly has references to other assemblies except those of the .NET Framework and the Microsoft.Xrm.Sdk dll's.
Referenced assemblies can only be used when you merge them into the plugin assembly, e.g. using ILMerge or ILRepack.

VSTest-Task not running .NET Core 2.1 xUnit-Tests from Test-plan

I'm trying to create a release pipeline in VSTS that runs my xUnit-tests as specified in a Test Plan.
Long story short: I can't get it to work.
What I'm using:
Azure DevOps (formerly VSTS)
Visual Studio Test task (v2.*)
Test project targeting .NET Core 2.1
xunit 2.4 with xunit.runner.visualstudio 2.4
In Azure DevOps I defined a Test Plan that contains a Test Suite which contains a Test that has an Associated Automation which points to my xUnit test.
I had to use the REST API to link the test code to the Test as described here.
I can select that Test in the visual designer for the VSTest task.
When I run the release pipeline the VSTest task fails with the following error message:
DiscoveryMessage : System.IO.FileNotFoundException: Unable to find tests for D:\a\r1\a\Foo.Tests.dll. Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk" and framework version settings are appropriate. Rerun with /diag option to diagnose further.
The path to the Foo.Tests.dll is correct, all required files are copied as well.
I explicitly specified the framework version in a .runsettings file (as the option Other console options doesn't work when using the Test plan option).
Specified the path to custom test adapters
used Visual Studio 2017 and Installed by Tools Installer options
Added a .NET Core Tool installer to install the correct .NET Core SDK
...and any other combination of settings I could think of.
The error message is still the same.
Any ideas what I might be missing? Your help would be greatly appreciated at this point!
After several more hours we stumbled across a web page that stated that you don't have to copy the binaries of your test project as input for the VSTest task but PUBLISH it instead. That never came to mind as vstest.console.exe runs smoothly when you point it at the binaries on a local machine.
UPDATE: We had to add a Publish Artifact task at the end of our Build Pipeline and make the Release Pipeline pick up the published artifact.

New Service Fabric Stateless Web Api Core Project will not compile

I open visual studio and do file->new project.
I select cloud->service fabric application. Then I pick Stateless ASP.NET Core. In the last window I select Web API and change the authentication to windows authentication.
When I do this and then compile the application, I get errors saying that System.Fabric, Microsoft.ServiceFabric.* are missing.
How can I get this to work?
NOTE: I have Visual Studio 2017 15.2. I downloaded and installed what I think is the most recent tools for service fabric. My "Extensions and Updates" says I have version 1.6.20170504.1.
UPDATE - This was due to the project having a dash in the name. It appears that the template cannot cope with dash casing your project name. (It had nothing to do with Windows Authentication.)
UPDATE - This was due to the project having a dash in the name. It appears that the template cannot cope with dash casing your project name.
This seems to be a problem with the template. If you don't select Windows Authentication, then it will compile fine.
In a project without windows authentication, the Nuget assemblies are:
Microsoft.ApplicationInsights.AspNetCore
Microsoft.AspNetCore
Microsoft.AspNetCore.Mvc
Microsoft.Extensions.Logging.Debug
Microsoft.ServiceFabric
Microsoft.ServiceFabric.AspNetCore.WebListener
Microsoft.ServiceFabric.Data
Microsoft.ServiceFabric.Services
When you select Windows Authentication, only the top 4 are added to the project.
If you add the four missing NuGet packages (the ones in bold above) then the project will compile just fine.

Add->REST API Client... command fails in VS2015

I want to add a RESTful API to my UWP project. But I get the following error in VS2015 when clicking OK in the Add->REST API Client dialog:
Generating client code and adding to project started
Generate client code for REST API with following parameters:
REST API Name: XXXXXX, Base namespace: XXXXXX, Metadata file path: C:\Users\XXXX\AppData\Local\Temp\WebToolsAutoRest\XXXXXX\201612291330467450\swagger.json
Exception: Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
Generating client code and adding to project failed
Adding REST API client for failed
I found someone facing the same problem here. But it seems he didn't find a solution to this problem. Ant pointers?
Thanks in advance.
I was seeing the same thing too on vs2015 (I only have 2015 installed though). Apparently the work around is to copy and paste the Newtonsoft.Json.dll into the folder path C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
I made sure to download the 7.0.1 version using NuGet.
https://github.com/Azure/azure-sdk-for-net/issues/2587
I ran into this same problem and I'm wondering if it's because I have the Visual Studio 2017 RC installed on the same machine as VS2015.
Here's my workaround. I opened the solution in VS2017 and added the REST API client. Then I closed the solution in VS2017 and re-opened it in VS2015. It's an ugly solution but it seems to work.

How to correct issue with creating Web API 2 OData Controller with Actions using EF code-gen template with VS 2013?

I have a couple of dev environments. In my older VS 2013 Ultimate, I can execute the Web API 2 OData Controller with Actions using Entity Framework template code to create classes.
The second is Visual Studio 2013 Ultimate with Update 2 RC. I can create other classes, however in trying to create the aforementioned, I get the following error:
Microsoft Visual Studio Error
There was an error running the selected code generator:
'Exception has been thrown by the target of an invocation.'
Since I have installed other components, I reset all settings through Tools / Import Export Settings / Reset All Settings.
I even completely uninstalled/re-installed - same issue on all fronts.
In both environments the code is exactly the same, connection to the same db.
I have tried using the code templates folder from the working env in the newer env - no go.
I also tried removing Update 2 RC through Windows / Installed Updates, but the request is rejected, indicating VS requires this update to run.
Suggestions?