Invalid License Exception when building TDS projects - sitecore

We're running Sitecore 6.5 with a few TDS projects, and I've been trying to get TFS builds to work on our TFS Build server. We receive the following error when the projects attempt to build:
C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets (354):
Exception Invalid License(Exception) in file sitecore\content.item.
Stack trace: at HedgehogDevelopment.SitecoreProject.Tasks.CollectSitecoreItems.Execute()
We've installed TDS on the build server, and I've verified in the registry that the license key matches to our license. Not quite sure what might be the next step. Has anybody encountered this issue with TDS continuous integration builds before?

I appreciate that this is an old question but wanted to add this in case anyone else stumbles upon it.
I've been setting up TDS on Visual Studio Online (what was TFS Online) following this wonderful article from Michael Edwards: http://www.experimentsincode.com/?p=586
Although it's a bit vague at the end of the article - you can actually include the License info with a config file. You have to add this file manually here:
C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0
Call the file TDSLicense.config
Save the following (with your license information in) in the file:
<?xml version="1.0" encoding="utf-8" ?>
<license Owner="CompanyName" Key="aaaa-bbb-ccc-dddd" />
If it's a permissions issue with reading the license from the registry - this should sort it out.
Micheal's blog post is well worth a read - it goes over and above what I've detailed here.

I'm not exactly sure I have an answer, but 2 things that happen to me frequently are:
The Hedgehog license expires once a month (not sure if that's my companie's agreement)
Sometimes I can't use TDS sync unless I re-install the SiteCore connector. Luckily, there's a button built-in for that: just right-click on TDS in Visual Studio, and select "Install SiteCore connector".
Hope this helps.

Related

SpecFlow/MSBuild Codebehind Gen - Generate All task

On a project I am working on, I am maintaining some Feature Tests written in SpecFlow. Our team started using Visual Studio 2017 about a year ago, and we finally got around to doing some upkeep on our tests!
Our tests for the project I'm working on were originally written in SpecFlow 2.3.2, and were last updated in Visual Studio 2015.
The SpecFlowSingleFileGenerator is known to not work on VS 2017, so I spent the better part of yesterday changing our suite to use the MSBuildSingleFileGenerator instead as detailed in this article in SpecFlow's official documentation
Problem:
Locally, I can build my solution, including the Feature Test project just fine.
However, I keep getting the following error when I try to build the project on our build server:
[exec] C:\CheckoutDirectory\My Awesome Project\packages\SpecFlow.Tools.MsBuild.Generation.2.3.2\build\SpecFlow.Tools.MsBuild.Generation.targets(45,5):
error MSB4036: The "GenerateAll" task was not found.
Check the following:
1.) The name of the task in the project file is the same as the name of the task class.
2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface.
3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin" directory. [C:\CheckoutDirectory\My Awesome Project\AwesomeProject.FeatureTest\AwesomeProject.FeatureTest.csproj]
I should point out that our team has no experience with writing MS Build tasks, as hitherto we haven't needed to; we use NAnt build scripts on TeamCity to manage our build work. It's clear that error message would be helpful...if we knew literally anything about it.
Now, normally the correct answer would be: Google it. I did that, and this specific error has no pertinent results.
Additionally, this is blocking my team, since we need our build to work. I don't have the time to do the research and education necessary to properly understand how MS Build technology works. That wil have to come later.
Question:
Bearing in mind that SpecFlow has broken our process, and our team's lack of knowledge about the MS Build system: I need to know how to get around the "GenerateAll" task was not found error. What do I do to get around it?
Secondary Question:
I'm also open to lateral thinking. Is there some way to hack either VS 2017 or SpecFlow to make the SpecFlowSingleFileGenerator "compatible" with each other? The objective here is NOT to avoid making changes, but to control the changes. I need a path towards transitioning from the old file generator to the MS build generation system.
Additional Information:
So, I did some digging, and I found a place where "GenerateAll" is being called in the SpecFlow.Tools.MsBuild.Generation.targets file:
<Target Name="UpdateFeatureFilesInProject"
DependsOnTargets="BeforeUpdateFeatureFilesInProject"
Inputs="#(SpecFlowFeatureFiles)" Outputs="#(SpecFlowFeatureFiles->'%(RelativeDir)\%(Filename).feature.cs')">
<GenerateAll
ShowTrace="$(ShowTrace)"
BuildServerMode="$(BuildServerMode)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
ProjectPath="$(MSBuildProjectFullPath)"
ForceGeneration="$(ForceGeneration)"
VerboseOutput="$(VerboseOutput)"
DebugTask="$(SpecFlow_DebugMSBuildTask)"
>
<Output TaskParameter="GeneratedFiles" ItemName="SpecFlowGeneratedFiles" />
</GenerateAll>
</Target>
Because I've confirmed that this is being copied out to the build server, the situation is yet more mysterious. It appears that the NuGet package is being pulled down faithfully. Therefore, I can't figure out why my local copy is behaving differently than the copy on the build server.
I am not sure where you found this statement:
The SpecFlowSingleFileGenerator is known to not work on VS 2017
The SpecFlowSingleFileGenerator is working in VS2015, VS2017 and VS2019. We see it as a legacy feature, but it's still there. Since some weeks it is disabled by default, but you can enable it in the options.
It works for SpecFlow >= 2.3.2 and 2.4. For SpecFlow 3 you have to use the MSBuild integration. There are some problems with older versions of SpecFlow, but with them it can also work. It depends on your setup.
About your MSBuild error:
The MSBuild Task for SpecFlow < 3.0 is in the specflow.exe. Is it on your build server?
It is part of the SpecFlow NuGet packages. Normally you get this kind of error if MSBuild can't find the assembly where the task is.
For "debugging" problems with MSBuild, I can highly recommend to use the MSBuild Structured Log Viewer (http://msbuildlog.com/). With it, it makes it easy so see what is happening in your build.
We have an example for MSBuild Code- Behind- Generation with SpecFlow 2.3.2 here: https://github.com/techtalk/SpecFlow-Examples/tree/master/MSBuild/OldCSProj_SpecFlow232
You could compare your project with this example.
Full disclosure: I am one of the maintainers of SpecFlow.

Harvest(Heat) Wix - archive resources in the msi

Is it possible to archive resources in msi file instead of creating .cab . What is the pros and cons of these two method
Embed Cabs: If you are referring to eliminating the external cab during MSI compilation for WiX visual studio projects, then you can achieve this by setting the EmbedCab attribute of the MediaTemplate element to "yes":
<MediaTemplate EmbedCab="yes" />
Here is an attempted "minimal changes" sample for how to build a basic MSI after creating a WiX project in Visual Studio. Suggest scrolling down to the actual WiX markup for the inline comments.
Why use External Cabs?: I rarely use external cabs if I can help it, but there are some advantages in some cases centering around build-speed and more reliable downloading (according to Arnson, see second link below). There may be further benefits. For example downloading a smaller cab for MSI repair operations if installation source is on a remote server - related to downloading. Cab files can make security software and anti-virus go spastic though.
How To: Optimize build speed
WiX and cabinetry
This question has been answered before BTW - in similar incarnations. See below.
Some Links:
Wix: single MSI instead of msi + cab
For the record: The embed cab behavior changed in WiX 3.8
What is the difference between Media and MediaTemplate in WIX?

After opening website in VS2017 - Error Publishing Customization

I am relatively new to Acumatica. I have been following the Development series of training videos and hit a hard stop on T300 video 4 after opening the website in Visual Studio and then trying to publish the changes in my customization project (after detecting/updating changed files).
Error:
The CodeDom provider type "Microsoft.VisualC.CppCodeProvider, CppCodeProvider, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be located.
My environment is pretty simple:
Acumatica ERP 2018R1
Visual Studio Community Edition
Windows 10 Pro build 1803
I found a number of posts suggesting that I install a nuget package, which may or may not have helped but did not fix the problem. (Microsoft.CodeDom.Providers.DotNetCompilerPlatform)
I stumbled across a reference to the node_modules folder (sorry, lost that post link) which prompted me to check my TST vs DEV instances, and I found it does not exist in my TST instance. I also then noticed that the error I received during publishing happens after a series of lines about node_modules.
After a little more digging, I found https://stackoverflow.com/a/43494775 which seems to have stopped the node_modules folder from being created and appears to have solved my problem publishing inside of Acumatica.
Other posts for visual studio claimed that the issue comes from the C++ compiler not being included in GAC in VS2017, but I completed the T100 and T200 courses on VS2017 without any issue. The problem seems to be connected specifically to opening the Acumatica Website in VS2017.
Does anyone have any experience with this issue that can confirm disabling NPM restores won't cause me headaches down the road? Or is there a better solution? I don't recall anything in the setup guides telling me to make this change, and I haven't found any references that this was an issue before VS2017.
I do recall running into this in older version of 2018R1.
These posts helped me solve the issue:
This post solved it for me:
How can I disable NPM package restore in Visual Studio 2015?
Also with help from this post:
Getting File Path error while adding file to files list in Customization Manager
if you still have the node_modules related folder just delete it and you should be good (from what I can remember).
If these don't work try the latest 2018R1 build. (or at least 2018R1 Update 1)

Qt Installer Framework: strange license error when updating

Sometimes when I use the maintenancetool.exe on Windows with "Update components", an error is displayed after the update has been downloaded and installed saying:
Error during installation process (com.myapp.windows_x86_64): Can not write license file: C:\Program Files(x86)/MyApp/Licenses\license.txt
with an option to ignore the error, retry, or quit. I can't figure out how to prevent this error. My package.xml file has the following line:
<Licenses>
<License name="MyApp Public License Agreement" file="license.txt" />
</Licenses>
and license.txt is stored in the same directory as package.xml as per the instructions in https://doc.qt.io/qtinstallerframework/ifw-tutorial.html#adding-licenses.
Edit: I realized I was inadvertently using qt installer framework version 1, so this may be bug QTIFW-315 as pointed out by Sergio. I have updated to version 3 and that seems to solve the problem.
It is a fairly broad question, and it is difficult to reproduce the same specific issue, hence the lack of answers.
I checked in the Qt bug tracker and nobody has reported a similar issue so far. It would be useful to know if this happens with different computers or just with one.
Usually you receive this kind of error messages either if the process doesn't have enough priviledges to write the file or if another process has locked the file. You may check if there is a process locking the license.txt file with utilities like Process Explorer (have a look here).
I hope this helps.
I also got this error. I found out that the problem is the space in the path "C:\Program Files(x86)/MyApp/Licenses\license.txt".

Can't get past Microsoft.VisualStudio.MinShell.Msi.msi in VS2017 RC Update

I previously successfully installed Visual Studio 2017 RC Enterprise on Windows 10 Home. I saw in the Notifications area an update to a later version of the RC, and so I clicked on that notification to install it.
The installation got as far as the attempting to install the Android Emulators, but failed and the log said it needed Win10 Pro.
So I removed the emulator from the install options, but the install didn't complete and this time the log said:
[27ac:0038][2017-01-31T10:08:47] Download requested: https://download.microsoft.com/download/8/7/A/87AEAAB0-D624-400E-899E-61FAFAE42BA5/Microsoft.VisualStudio.MinShell.Interop.Msi.msi
[27ac:003a][2017-01-31T10:08:47] Attempting download 'https://download.microsoft.com/download/8/7/A/87AEAAB0-D624-400E-899E-61FAFAE42BA5/Microsoft.VisualStudio.MinShell.Interop.Msi.msi' using engine 'WebClient'
[27ac:0026][2017-01-31T10:08:48] Completed: Installing Microsoft.VisualStudio.MinShell.Msi
[27ac:0026][2017-01-31T10:08:48] Error: Package 'Microsoft.VisualStudio.MinShell.Msi,version=15.0.26109.1' failed to install. MSI: C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.MinShell.Msi,version=15.0.26109.1\Microsoft.VisualStudio.MinShell.Msi.msi, Properties: REBOOT=ReallySuppress ARPSYSTEMCOMPONENT=1 MSIFASTINSTALL="7" VSEXTUI="1" VS7.3643236F_FC70_11D3_A536_0090278A1BB8="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise" , Return code: 1316, Details: The specified account already exists.
I tried to follow the instructions from Visual Studio 2017 RC Install Error "The specified account already exists." however its says the action is only valid for installed products
Yesterday I did notice MinShell in the Programmes Uninstall list and tried removing it from there.
However it makes no difference and every time I try and run the installer I get the same error. I have tried making sure that no VS2017 related items are installed in Programs and Features, and deleting directories manually from Program files etc
Starting to get really annoyed as I had a completely working compiler and IDE and I've already been totally unable to upgrade Win10 to the Anniversary Update due to the 0x8007002C – 0x400D error during Migrate-Data operation. I tried the fix of resetting the Storage app to make all defaults C:, and then the Documents link, but that didn't fix it, although I see I've missed Downloads, Pictures and Video, so will try again tonight but I still don't see it working, although I think the failure moved from 79% to 83%
#Peter Nimmo I had the same issue. Solve it by:
Go to C:\Program Data\Microsoft, go to Properties then click the Security tab and add System, then give full permission. The reason why it couldn't install is because it can't access the folder required.
Hope it works for you. If it doesn't, you could try the following additional steps:
Go to C:\ then at the search box type %temp% then delete everything in it.
Run this script in Powershell Admin mode: https://gist.github.com/heaths/77fbe0b44496960fab25c2eb0b9e8475.
This problem might be caused by setting a separate cache folder when installing. The steps below should fix it.
delete the visualstudio folder in your Registry editor HKEY_LOCAL_MACHINE\SOFTWARE(under Microsoft?)
run InstallCleanup.exe---> C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout
delete contents in your temp folder C:\Users\yourusername\AppData\Local\Temp(skip items that cannot be deleted)
run InstallCleanup.exe
inside C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout
then restart your computer
Go to %ProgramData%\Microsoft and rename VisualStudio folder (e.g. to VisualStudio_old)
Try again with fresh install.
Please temporarily disable 3rd party anti-virus software and try the following steps to check if it works for you:
Type “Administrative Tools” in search box
Open “Local Security Policy”
Navigate to “Software Restriction Policies” (If it displays “No Software Restrictions Defined”, please right-click on the “Software Restriction Policies” node and select “New Software Restriction Policies”)
Double-click on “Enforcement”
Select “All users except Local Administrators” and click on OK
Restart your computer and run the Visual Studio Installer as administrator to repair the installation
Please Refer : https://learn.microsoft.com/en-us/answers/questions/147767/visual-studio-2019-can39t-install-microsoftvisuals.html
similar error for me sort of, it starts installing then gets stuck on shell(minimum) and shell interops and the shell(minimum) resources and interop resources..then i get a fatal error, tells me that Visual Studio Devenv resource fails.. no matter what i try i cannot install on my windows 10 1607 anniversary update 3 64-bit with all updates to this minute. I read microsoft is aware and its become a huge problem, programming error. Anyone figures out how to install let me know please.
EDIT: so its a huge pain to get visual studio 2015 to install, i kept reinstalling it and everytime the error window came up i read the log, then i manually searched and installed components listed, and also had to manually create folders almost each time following the path listed in the log file. after 12 hours and alot of searching and installing i now have a fully functional visual studio 2015 pro edition back on my computer..i wanted 2017 but thats even worse to install..lol..