SSIS Unit-test not run well (incompatible) - c#

I tried find and use a open source framework for start BI project with TDD .
I choose SSISUNIT for step one. ssisUnit is a unit testing framework for SQL Server Integration Services. It is loosely based on the xUnit family of unit testing frameworks, but is tailored to better support the SSIS environment.
Download SSISUNIT project and run solution 2017 in VS. But I've error when sln open.
Problem :
I tried :
Install the latest version of SSDT recommendation (in this question)
I have SQL Server Integration Services Project, Microsoft reporting service project, Microsoft analysis service project
Read same question but not worked for me in vs 2019.
I tried changed the Project platform to x86,x64 and AnyCPU.
We use SQL-SERVER 2019 SSIS SSAS(MDX), Visual Studio 2019, Power BI

You'll need to remove or unload that project from the solution. Microsoft deprecated support for the setup projects.

Related

run unit test in .net framework 4.8 with command line

I recently created a unit test project(.net framework) in my project(.net framework 4.8).
I run my tests with visual studio enter image description here.
now wanna add a stage to my ci/cd on gitlab to run my tests.
I know how to do that in .net (dotnet test) but I don't know how to run my tests for .net framework with command line
I'll be happy to know your solutions.
Tnx
The VSTest.Console.exe tool can be used to run unit tests. This is equivalent to using the Visual Studio Test Explorer window.
VSTest.Console.exe is installed with Visual Studio. It is also available in the Microsoft.TestPlatform NuGet package.
(As a note for the benefit of users of Azure DevOps, Azure DevOps pipelines has a Visual Studio Test Platform Installer task that will install the test runner. The Azure DevOps task uses the NuGet package.)
For .net framework you should get familiar with MSBuild. If you are using MSTest you also need to know VSTestConsole. Not too hard!
Here is a minimal GitLab CI config for a .Net framework solution.
Also check here for more detials.

Adding WCF service generates Reference.cs file with references to Microsoft.CodeDom instead of System.CodeDom

I am trying to add a reference to a WCF service in my project but whenever I do it, the classes in the Reference.cs file have the attribute [Microsoft.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")] on top of it instead of [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] (which I usually see in other projects).
The problem is that the assemblies for Microsoft.CodeDom can't be found. I found a nuget package named Microsoft.CodeDom.Providers.DotNetCompilerPlatfor but it is not compatible with .NET 5.
Also using a pre-release version of a package seems weird (2.0.3-preview3.21351.2).
Would anyone know why Visual Studio is generating that odd Reference.cs file?
If I try to add a reference to the same WCF service in a .NET Framework 4.8 project the Reference.cs file is generated as expected (using the attribute [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]).
Here is the information about my Visual Studio installation
Microsoft Visual Studio Professional 2019 Version 16.11.3
VisualStudio.16.Release/16.11.3+31702.278 Microsoft .NET Framework
Version 4.8.04084
Installed Version: Professional
.NET Core Debugging with WSL 1.0 .NET Core Debugging with WSL
ASP.NET and Web Tools 2019 16.11.75.64347 ASP.NET and Web Tools 2019
ASP.NET Web Frameworks and Tools 2019 16.11.75.64347 For additional
information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 16.11.75.64347 Azure App Service
Tools v3.0.0
Azure Functions and Web Jobs Tools 16.11.75.64347 Azure Functions
and Web Jobs Tools
C# Tools 3.11.0-4.21403.6+ae1fff344d46976624e68ae17164e0607ab68b10
C# components used in the IDE. Depending on your project type and
settings, a different version of the compiler may be used.
Common Azure Tools 1.10 Provides common services for use by Azure
Mobile Services and Microsoft Azure Tools.
IntelliCode Extension 1.0 IntelliCode Visual Studio Extension
Detailed Info
Microsoft Azure Tools for Visual Studio 2.9 Support for Azure Cloud
Services projects
Microsoft Continuous Delivery Tools for Visual Studio 0.4
Simplifying the configuration of Azure DevOps pipelines from within
the Visual Studio IDE.
Microsoft JVM Debugger 1.0 Provides support for connecting the
Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft Library Manager 2.1.113+g422d40002e.RR Install client-side
libraries easily to any web project
Microsoft MI-Based Debugger 1.0 Provides support for connecting
Visual Studio to MI compatible debuggers
Microsoft Visual Studio Tools for Containers 1.2 Develop, run,
validate your ASP.NET Core applications in the target environment. F5
your application directly into a container with debugging, or CTRL +
F5 to edit & refresh your app without having to rebuild the container.
Node.js Tools 1.5.30526.3 Commit
Hash:c09c81113bcbc86d57943fcdd67e82434263d61d Adds support for
developing and debugging Node.js apps in Visual Studio
NuGet Package Manager 5.11.0 NuGet Package Manager in Visual Studio.
For more information about NuGet, visit https://docs.nuget.org/
ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual
Studio Extension Detailed Info
Razor (ASP.NET Core)
16.1.0.2122504+13c05c96ea6bdbe550bd88b0bf6cdddf8cde1725 Provides languages services for ASP.NET Core Razor.
SQL Server Data Tools 16.0.62107.28140 Microsoft SQL Server Data
Tools
TypeScript Tools 16.0.30526.2002 TypeScript Tools for Microsoft
Visual Studio
Visual Basic Tools
3.11.0-4.21403.6+ae1fff344d46976624e68ae17164e0607ab68b10 Visual Basic components used in the IDE. Depending on your project type and
settings, a different version of the compiler may be used.
Visual F# Tools
16.11.0-beta.21322.6+488cc578cafcd261d90d748d8aaa7b8b091232dc Microsoft Visual F# Tools
Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for
hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Container Tools Extensions 1.0 View, manage, and
diagnose containers within Visual Studio.
Visual Studio Tools for Containers 1.0 Visual Studio Tools for
Containers
I found out that VS 2019 was using version 2.0.3.preview.3.21351.2 of donet-svcutil to generated the reference file (no idea why it is using a preview version of a package though)
So this is more an workaround then a solution but I managed to add update an existing reference by doing the following (I ran all commands in Powershell):
Install version 2.0.2 of dotnet-svcutil
dotnet tool update --global dotnet-svcutil --version 2.0.2
To Update a reference go the root of the project which has the WCF reference and do
dotnet-svcutil --update {path for the folder which contains the Reference.cs file}
To add a new reference you may refer to the doc of dotnet-svcutil by running
dotnet-svcutil -h
I have also created an issue for VisualStudio team so they can investigate why it is using a preview version of the nuget package
You can access it here

How to build OPC Foundation .NET library with Visual Studio

I am trying to build the OPC foundation provided SDK by visual studio. I face lots of builds error.
I tried VS2013, VS2017 community version, and VS2019 professional version.
Does anybody have experience building this SDK?
The source code can be downloaded from Github.
https://github.com/OPCFoundation/UA-.NETStandard
Following images show the dot net version and the errors
Which solution are you trying to build?
As astrowalker indicated can you share the error messages?
This worked for me:
cloned the repository
opened solution "UA Core Library" within VS2019
restore nuget packages
rebuild solution
run all test of project "Opc.Ua.Core.Tests"

Auto-generate unit tests in ASP.NET Core 1.1

NOTE: I asked this on SoftwareEngineering site, but someone replied to the "where does my tooling question go", and that link said to ask on Stackoverflow (at least that's how I interpreted the answer)"
I've had this in previous projects, but I don't see it in my new ASP.NET Core 1.1 project.
Previously, I could just right-click on a method or class and select "Create Unit Tests" or "Run/Create IntelliTest".
After some googling, it looks like first versions of VS2017 or ASP.NET Core didn't have this feature yet.
Has this been added yet? If so, which versions of ASP.NET Core and Visual Studio do I need?
I have VS 2017 15.3.5
ASP.NET Core 1.1
Thanks!
You said that you are using VS 2017, but you didn't specify which edition. The IntelliTest feature is available in VS 2017 Enterprise. Check out Generate unit tests for your code with IntelliTest
Availability and extensions
The Create IntelliTest and Run IntelliTest menu commands:
Are available in only the Enterprise Edition of Visual Studio 2015
and later.
Support only C# code that targets the .NET Framework.
Are extensible, and support emitting tests in MSTest, MSTest V2,
NUnit, xUnit format.
Do not support x64 configuration.
Also, read Generating Unit Tests with IntelliTest using Visual Studio Enterprise 2017

Is there anyway to set up automated build task in Team Services for ".xproj" .NET Core project

I my team and I are using Visual Studio 2015, Team Services to build and manage a .NET Core application with multiple .NET Core class libraries all of which are ".xproj" projects. We are now looking to move away from manual builds and follow the continious integration and deployment approach. When adding a build task in Team Services there is a template option for building .NET Core applications. When selected I can see that the restore and build jobs are auto populated with the .csproj extension.
I have changed these to xproj and ran a build only to get the following error for each project in the solution.
Test.xproj'. The file type was not recognized.
2017-05-31T07:24:59.1375560Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
How can I set up a build definition for xproj .NET Core projects?
Any help is appreciated.
Thank you.

Categories

Resources