I'm trying a React/Redux .NET core (2.0) web project in Visual Studio 2017. And I've installed font-awesome using npm. It's there and I can see it in the node_modules folder, but I'm not sure if the web project should see it automatically or if I have to drag it into my dist folder and edit my layout page to see it. I'm not against doing that, but as a VS programmer, I'm used to things being a bit more automatic mainly for the sake of package updates. I'm not really confortable editting the vendor.js or vendor-manifest.json files.
Anyone know what I'm doing wrong? (no guesses, please.)
I was looking for an answer to a similar question and came across FA's package specifically for React. They have some good instructions on this page.
Related
I upgraded to Visual Studio 2017 last week. A solution with several test projects using MSTest v1 seemed to be fine at first. Most test projects execute tests fine. This is .NET Framework, not .NET Core.
However, there is one project where I am encountering issues. It's an integration test project, meaning it runs web application tests using the ChromeDriver and Selenium. This project references NUnit, though that reference comes from another project reference. I am not actually using NUnit as my test framework.
This is the error when trying to run any test in that particular test project:
Could not find test executor with URI 'executor://mstestadapter/v1'. Make sure that the test executor is installed and supports .net runtime version .
Test project {name} does not reference any .NET NuGet adapter. Test discovery or execution might not work for this project.
It's recommended to reference NuGet test adapters in each test project in the solution.
Disabling the option indicated below made everything work:
I found this solution after browsing the preview release notes at https://learn.microsoft.com/en-us/visualstudio/releasenotes/vs2017-preview-relnotes#--visual-studio-2017-version-158-preview-4 (scroll down to "... What's New ..." and then .NET Test Adapter Extension). It mentions this breaking change (though it didn't break my other projects), but there is no mention of what to actually do to solve the problem.
Of course, long-term, keeping that option unchecked doesn't seem feasible. So I am looking for guidance on how to proceed.
I already tried to see if I could "quickly" upgrade to MSTest v2, but that had an issue because System.Runtime 4.1.2 couldn't be found. I tried adding System.Runtime 4.3.0 via NuGet, but that didn't solve the issue.
I was getting a similar issue running Xamarin.UITests and resolved it by installing the "NUnit 2 Test Adapter" Extension in Visual Studio. In Visual Studio 2017 you do this from Tools > > Extensions and Updates... > Online > Search "NUnit Adapter" > click the NUnit 2 Test Adapter then the Download button to install. Restart Visual Studio when prompted to complete the installation.
It would be interesting to understand how the MSTest V1 framework assembly(Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll) is referenced in this project. The compatibility checkbox that also ended up being disabled in the image above should ensure that this project has MSTestV1 tests and enabled run tests. If it isn't then for some reason the detection logic is busted and needs to be fixed - a snippet on how the assembly is referenced would be helpful there.
As for moving to MSTest V2, this blog should help: https://blogs.msdn.microsoft.com/devops/2016/06/17/taking-the-mstest-framework-forward-with-mstest-v2/ . And for the specific issue you seem to be running into, this github issue on the repo sounds similar: https://github.com/Microsoft/testfx/issues/184 .
Caltor's answer pretty much solved it for me: it was the NUnit Adapter I needed. But I followed slightly different steps. Here they are for VS 2019 (but probably apply to VS 17 too):
Right clicked on the References node under my project in the solution explorer
Chose "Manager NuGet packages"
Clicked Browse
Searched for nunit3testadapter
Hit install on the result that popped up
The issue for me was similar to the OP's - the adapter was installed on some projects but not others. But confusingly this wasn't immediately visible under the "References" node for that project. The only node relating to nunit under that References node said "nunit.framework". So the references for test with and without the adapter looked the same.
"... but that had an issue because System.Runtime 4.1.2 couldn't be found."
I think this is a setting in the app.config that does not get updated when the project settings are updated. I searched for System.Runtime under the packages folder and then changed my app.config to match what I found, and then that particular problem went away.
I'm starting out with Test-Driven Development with Visual Studio 2017 Enterprise, but can't - however hard I've tried - make it work. I've tried trawling everywhere on the WWW to search for a solution, to no avail. So I hope that someone here will be able to help. The issue goes as follows:
I have created an ASP.NET Core web application, and a separate Test project; I'm using NUnit as the test framework (I first used xUnit but for some reason the tests disappeared and would not run). Anyway, when I try to reference my ASP.NET Core Web app from the test project, the following error shows up:
Project '..\MyProject\MyProject.csproj' targets 'netcoreapp2.1'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.7'. UnitTestProject1
Does anyone have a clue about what can be wrong and how it can be fixed? Any help will be greatly appreciated.
Best regards.
EDIT
I am elaborating a little on the issue here. I try to illustrate it below. I have attached 3 images to show what I mean.
First, when I want to create a test project in Visual Studio, I go to the "Test" templates - and there I only see the templates shown in fig. 1 - there I have the possibility for selecting between different .NET versions as shown in the dropdown. Regardless of which one I selected I received the error mentioned in my earlier post.
Then, I tried using the .NET Core templates where I found 2 types of test projects: MSTest and xUnit tests (see fig. 2). MSTest is not usable in my case as it's a bit too limited for this exact application. Therefore, I tried using the xUnit test project. However, when I do that, the system complains about all sorts of libraries missing, and when looking in the "Dependencies" section in the solution explorer, all libraries are shown with a yellow "Warning" triangle on them (see fig. 3), and nothing compiles at all.
So I'm a bit stuck. Any ideas?
The test project is targeting .NET Framework 4.7 and the web project targets .NET Core App 2.1.
You cannot add a reference from one to another as they are incompatible.
To solve this you should create a test project that targets netcoreapp2.1 and add a reference from it to the web project.
I've been looking into the Qt installer framework but when you create a setup using this tool it is a regular setup though I was wondering whether it would be possible to create an msi setup to be able to install a Qt program network wide.
I've looked at the installer framework docs but was unable to find anything about this so far.
Qt installer framework doesn't provide creating of MSI installer. For MSIs you should use WiX for example.
You have got a proper answer, maybe I'll add some further links for you. Before I do that I can verify that WiX can be used to make MSI installers for any type of Windows application.
There are also a few other tools available to make MSI files that you might want to look at depending on your needs - both open source (free) and commercial. Though WiX is very flexible and great when you have it set up, commercial tools can help you get an MSI created much quicker. Have a read below of the different tools and their pros and cons.
Below are a few links for you - I am a "linking monster" :-). If you pardon what looks like shameless self-promotion, it is really a guess as to what you could find useful to get your MSI file created:
What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc (various MSI tools with description of pros and cons)
Windows Installer and the creation of WiX (a little unofficial story of WiX's creation)
WiX "quick start" suggestions (getting started with WiX - not my favorite answer - it is a bit messy - but somehow it seems to be helpful for people)
How do I avoid common design flaws in my WiX / MSI deployment solution? (messy, but may be worth a skim to avoid some problems)
And a few more peripheral links thrown in:
Syntax for guids in WIX? (simplifying WiX source files)
How can I compare the content of two (or more) MSI files? (tools you can use to inspect the compiled MSI files - and some tips for comparing different versions and decompiling MSI files)
Change my component GUID in wix? (understanding the critical component GUID concept in Windows Installer / MSI)
Hi Fellow Sitecoryians ,
I'm in the process of upgrading a website sitting on Sitecore 7.1 rev140130 webforms to Sitecore 8.2rev160729 MVC-5 / Webforms hybrid. I require to keep the old content running. Because this is just an upgrade of the backend. But plan to start developing in MVC for all new components etc. I will phase out the old web forms as content pages change. This requirement is pushed on me by the business.
The old site used Glass Mapper to generate and map content from sitecore. Using the old Glass.Mapper.Sc.CasteWindsor v3.2.1.21 via t4 scripts in TDS.
I looked over the Glass homepage. Where is states that Glass.Mapper.Sc is all that you require now. But there are conflicting tutorials out there stating you need to install the MVC-4 or MVC-5. I figured I would ignore them for now and stick to the Glass suggested install.
Trouble is that the old Model properties are tagged with attributes like
[SitecoreId] & [SitecoreInfo(SitecoreInfoType.Language)]
Which don't seem to be in the Glass.Mapper.Sc library. The only reference I can find of these attributes in the available nugets packages. Is the Glass.Mapper.Sc.Core package.
I tried to install that package in the models project. Just to see this :
Start package installation to project [project].Logic.Models
Installation failed. Rolling back...
Error: Unable to resolve dependencies. 'Glass.Mapper.Sc.Core 4.2.1.189' is not > compatible with 'Glass.Mapper.Sc 4.3.1.194 constraint: Glass.Mapper.Sc.Core (≥ > 4.3.1.194)'.
Installation finished.
I feel like I might be making a mistake if I down-grade the Glass.Mapper.Sc so I can install the Core library. I might be shooting myself in the foot later on. Because I still have to install WFFM and Social Connection Module being replace with the internal sc8 social components..
My understanding was that the new Glass.Mapper.Sc package should cover all my needs.
So should I down grade and try and use the older version with the Core libraries?
Or should I refactor the models to use a new attribute system. What ever that may be?
(Keep in mind there are around 50+ models in the project. So it's not something that I would like to have to do .. )
Glass Mapper was significantly changed in version 4 and the biggest change was the removal and reliance on Castle Windsor. A list of the changes were listed in the release blog post.
The Nuget package/installer has also been changed so there is now only a single Nuget package instead of the several which you previously had to install. To support this, the Nuget installer checks for the presence of Sitecore.Kernel.dll and System.Web.Mvc:
To make things simpler V4 uses a Powershell script to decided which references to add to your project, it checks both the Sitecore.Kernel version and the System.Web.Mvc version and then installs the appropriate Glass.Mapper.Sc and Glass.Mapper.Sc.Mvc assembly.
My suggestion would be to remove the old V3 assemblies and Nuget references, make sure the above 2 DLLs are correctly referenced in your project(s) and then install Glass V4 Nuget to those projects again.
The SitecoreId and SitecoreInfo attributes are still in the Glass.Mapper.Sc library, the Core library has been removed/refactored. I don't believe this namespace has changed since V3 but make sure you are using the GlassV3Header.tt file and the using Glass.Mapper.Sc.Configuration.Attributes namespace is correct in that file.
https://github.com/HedgehogDevelopment/tds-codegen/blob/master/Sitecore.Master/Code%20Generation%20Templates/GlassV3Header.tt#L32
I wonder if someone has idea about next.
I'm developing for BlackBerry. IDEA doesn't recognize RIM installation as JSDK or Mobile SDK. So I have create project without SDK and attach RIM jar file as dependency.
I'm trying to write as much as possible unit test with JUnit and Mockito but to run them IDEA requires JSDK. So I created additional module where I set JSDK, correct language level and it works. It's already hassle to create additional module (better if we could set JSDK and other compiler, runtime options for code and tests) but I was quite happy.
I have also dependencies for some common libraries which we use in android and J2ME also. I added them as modules with JSDK 1.6 and language level 1.3. And I able to develop and run test on it also.
But I got issue with LEDA EAP. IDEA now complaints about incompatibility with java.lang because it found them both in RIM jar and JSDK for libraries. And now I'm thinking about next hassle to fix my favorite ide. Sure it's EAP and things could be changed.
But anyone has any recommendation or similar situation setup?