Infragistics license exceptions when MSBuild-ing - exception

When running the MSBuild scripts for a project, I'm getting the following errors:
Properties\licenses.licx(1): error LC0004: Exception occurred creating type 'Infragistics.Win.UltraWinEditors.UltraNumericEditor, Infragistics.Win.UltraWinEditors.v5.2, Version=5.2.20052.1028, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' System.ComponentModel.LicenseException: Unable to locate license assembly.
Properties\licenses.licx(2): error LC0004: Exception occurred creating type 'Infragistics.Win.Misc.UltraGridBagLayoutManager, Infragistics.Win.Misc.v5.2, Version=5.2.20052.1028, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' System.ComponentModel.LicenseException: Unable to locate license assembly.
Properties\licenses.licx(3): error LC0004: Exception occurred creating type 'Infragistics.Win.UltraWinEditors.UltraCheckEditor, Infragistics.Win.UltraWinEditors.v5.2, Version=5.2.20052.1028, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' System.ComponentModel.LicenseException: Unable to locate license assembly.
It appears that there's a problem with my machine's Infragistics license.
I have valid license files in my solution, so what's causing this issue?

There is a much easier solution: Set the build action on your license.licx to None.

From a user comment in Infragistics forum archive
install as the Sysadmin for "All Users" and then the
user will develop and compile their app.
Here is a workaround but unfortunately, this does not explain the root cause.
Here is a blog post from Infragistics to deal with automated builds but I don't think it is your case. And a further reference to that same post adding more info here.
I guess you had already looked at those links but they might be helpful to somebody else with a similar problem.

it's much easier just to only change the build compilation to any CPU and you're done!
it will run with no problem.

Make sure the license compiler (lc.exe) can find the location of your Infragistics assemblies. Also, if you've updated your components anytime recently make sure there aren't multiple copies with different version numbers lying around. Finally make sure that the version your are trying to use is the same version in the licenses.licx file.
An easy way to refresh the licenses.licx is it open the form designer, add an Infragistics component and remove it.
If for some reason the licenses.licx file doesn't refresh you can try removing the offending entries first then refresh it.

Related

sun.security.validator.ValidatorException: PKIX path building failed:

I'm trying to implement gatling for a my project using gradle, I'm referring this blog to implement the same, it works very fine if I try to implement it as a individual project in intellij as per given in the blog.
But if I try to integrate the same with a project and add the plugin id for existing build,gradle then it gives me below error,
plugins {
id "com.github.lkishalmi.gatling" version "0.3.0"
}
* What went wrong:
Error resolving plugin [id: 'com.github.lkishalmi.gatling', version: '0.3.0']
> Could not GET 'https://plugins.gradle.org/api/gradle/4.2.1/plugin/use/com.github.lkishalmi.gatling/0.3.0'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Not able to understand why its not working for integrating the project and working for individual one.
Could somebody please let me know how to deal with this problem,
I have been looking for solution and many places it is written that I will have to configure some certificate and many steps.
But I would not like to do that because if certificates was the problem then it should have been for individual project as well, if I remove the plugin com.github.lkishalmi.gatling then there would not be any problem, could there be any possibility because of other plugins, something is conflicting and then this issue is arriving.
I'm not able to understand the nature or logic of this issue, does it appears when there is something conflicting or its stand alone certificate problem.
In an individual project I tried adding the plugins from my project in that case it gave the same problem but for some added plugin like for adding below,
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.1')
So looking for the ways how can I go ahead with this.
Finally I could able to resolve the same by importing local network certificate, I tried to refer Jay's comments from the this reference issue followed by setting up MAVEN_OPTS env variables and also I had to switch to unrestricted network solved my problem.

Monodevelop fails to build, can't find Microsoft.DiaSymReader.Native.x86.dll'

I am trying to build a web api project using monodevelop on a mac. The thing is that after a few hiccups (explained in a question that turned out to be so messy I have just deleted) I get to the point of getting this error
/Users/myuser/git/LiveData/LiveData/CSC: Error CS0041: Unexpected error writing debug information -- 'Windows PDB writer is not available -- could not find Microsoft.DiaSymReader.Native.x86.dll' (CS0041) (LiveData)
In a windows machine the same project builds using visual studio targeting mono 4.5.
When I click on the error it tells me that /Users/myuser/git/LiveData/LiveData/CSC doesn't exist
Another thing is that in the folder structure of the solution there's a package folder (not the one inside the project) and inside this one I have a folder called Microsoft.Net.Compilers 1.3.2 that has inside another folder called "tools" that contains among other things csc.exe and the dll thta can't be found.
I have tried to install the dll directly in the project using nuget but even if it was installed the build showed me the same error
Thanks,
As for workaround for now you can just limit usage of Microsoft.Net.Compilers to Release configuration (edit *.csproj file):
<Import Project="..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props" Condition="'$(Configuration)' == 'Release' And Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" />
take a look at beginning of condition:
'$(Configuration)' == 'Release'
This way I can build and debug locally and build my project ie. in appharbor.
Building the project in release configuration should fix it!
This might not be completely related but may be helpful in some ways. Regarding the issue on 'could not find Microsoft.DiaSymReader.Native.x86.dll', have a look at this issue on GitHub: https://github.com/dotnet/cli/issues/3016
It seems like the solution is either:
Dependency to Microsoft.NETCore.Platforms needed for RID graph which
was missing. Any package which has transitive dependency on it (like
NETStandard.Library) could also make things work.
Adding dependency to "Microsoft.NETCore.Platforms": "1.0.1-" or
"NETStandard.Library":"1.5.0-" make it work.
adding Microsoft.NETCore.Platforms works as well

Msbuild running in Jenkins target calling HgPull fails with HgProcessException: The command <hg.exe> is not available

I am porting over an MSBuild script from CCnet to run in Jenkins. The MSBuild project is used to create a deployment package. I would rather have Jenkins drive this process itself but that's a longer term aim.
The problem i am having is (as in the title) when we try and use the HgPull target, from the MSBuild mecurial task (http://msbuildhg.codeplex.com/) we get the error message
HgProcessException: The command hg.exe is not available [Path to project]
I have seen on the project web site that someone solved it by adding the LibraryLocation proeprty to the target but that seems to have made no difference. My target currently looks like this:
Target Name="UpdateSources">
<HgPull
LibraryLocation="C:\Program Files\TortoiseHg\hg.exe"
Force="true"
Update="true"
LocalPath="$(SourcePath)"
/>
<HgUpdate
LibraryLocation="C:\Program Files\TortoiseHg\hg.exe"
Clean="true"
LocalPath="$(SourcePath)"
/>
I'm rather at a loss. Please let me know if you need any more information added to this post to solve this issue. I'm really quite new to MSBuild so really not sure where to start investigating this.
EDIT:
One thing i forgot to mention was that i have tried running the MSbuild command in a console window on the build server and still get the same result. This is really odd given it works fine in CCNet, what magic is CCNet doing to make this command work?
This is now resolved, unfortunately i'm not sure what changes i made to correct these. I believe it may have been down to path separators and whether they where trailing or not in another part of the config file. It does so annoy me with the lack of resilience/consistency between applications where you need to specify paths with/without trailing slashes.
Just a thought, but try adding 'C:\Program Files\TortoiseHg' to your system path. Maybe CCNet has it specified somewhere that Jenkins doesn't have access to.
Also, just for sanity's sake, verify that hg.exe actually exists at that location.

SignTool error while packaging Windows Store app

During packaging the Windows Store application, I get an unspecified error [APPX1204]:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\AppxPackage\Microsoft.AppXPackage.Targets(1139,9): error APPX1204: Failed to sign 'D:\Projects\VS2012\Stroik\Stroik\AppPackages\Stroik_1.0.0.11_AnyCPU_Test\Stroik_1.0.0.11_AnyCPU.appx'. SignTool Error: An unexpected internal error has occurred.
Build output refers to the part of a file generated by VS2012:
<SignAppxPackage AppxPackageToSign="#(FinalAppxPackageItem)"
CertificateThumbprint="$(PackageCertificateThumbprint)"
CertificateFile="$(PackageCertificateKeyFile)"
HashUri="$(_HashUri)"
EnableSigningChecks="$(EnableSigningChecks)"
>
<Output TaskParameter="ResolvedThumbprint" PropertyName="ResolvedThumbPrint"/>
<Output TaskParameter="AppxPackagePublicKeyFile" PropertyName="AppxPackagePublicKeyFile" />
</SignAppxPackage>
Yesterday packaging proceeded successfully. Today I added aditional logic to my app and changed some data in manifest. Since then I'm reciving presented error. I tried to regenerate Certificate in Packaging menu, delete Store/Temporary Keys (then regenerate), ... much more but nothing helps.
Now I have no idea how to handle it. Furthermore packaging a new project (as it is provided by vs2012) results in the same error.
Have you got any suggestions how to solve it.
If it helps anyone else, I was trying to make the build on a network share (virtualizing windows). Creating it on the Windows partition solved the issue.
I was developing on a Virtual Machine in VirtualBox and tryed to publish to the shared folder.
Change the output folder to a local folder on the virtual maschine solved it.
Granted this is older - see if you can try it with a different live id
You could also try to generate a new app, and diff the manifests between the apps.
Now according to:
http://social.msdn.microsoft.com/Forums/en-US/toolsforwinapps/thread/f25939fb-c48c-4bd0-938e-6a0afbd2dca0/
you may want to sign out, use IE 'in safe private browsing' and create a new one.
Also ensure that IE is set in "Browsing History->Settings" to get a new version of the page every time.
Login with the new one and give it a try.
I'm not sure if this error is related here or not, but it's a starting point based on the prior feedback on the above post.
This japanese site lists the same error code and seems to have the same resolution as well
http://coelacanth.heteml.jp/blog/windows-8signtool-error-an-unexpected-internal-error-has-occurred/
Its worth a shot, but I'll admit on this one not being 100% sure, just trying to help out : )

Support multiple assemblies on ASP.NET\C# projects

We're developing a ASP.NET application and having some problems with integration with a MS dll (Microsoft.AnalysisServices)?
The original project was linked to the dll which came with SQLServer2005 (Version=9.0.242.0). After migrating to SQLServer2008R2 (version=10.0.0.0) we encountered this problem:
Could not load file or assembly 'Microsoft.AnalysisServices,
Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
or one of its dependencies. The system cannot find the file
specified.
This is understood since we compile the project with one version and then another version is located on the server. After installing SQLServer2008R2 on the development machine the problem was fixed.
However we now have another problem that we need to support both SQLServer2005 and SQLServer2008R2 environments. I know that we can redirect the search path for the dll using a config file (that it will search for a different version that what it was compiled with), but I can't seem to find instructions how to use it for Web Application (on w3wp). We tried to use "Specific Version"=false, but since this is a "Strong Name" assembly it doesn't work as one would think.
The relevant link which I found is this:
http://social.msdn.microsoft.com/Forums/en-US/sqlanalysisservices/thread/47d0b992-3c10-4851-b2a5-9f72d2c0976e
Can someone please direct me to a link for solving this issue?
Update: I guess I didn't test it correctly since it doesn't work for other servers in SQLServer2008 R2. I guess you can't use range in the newVersion element. So the question is still opened for everyone! . Bottom line is that I know that I have version 9.0.242.0 but the customers version may be either 9.0.242.0 or 10.0.0.0. Is there a method which I can dynamically choose the correct assembly on the production server
You can hook into AppDomain.CurrentDomain.AssemblyResolve and load the assembly you want. If you return null it will look for it normally.
eg.
AppDomain.CurrentDomain.AssemblyResolve += Resolve;
private static Assembly Resolve(object source, ResolveEventArgs args)
{
if (args.Name.StartsWith("Microsoft.AnalysisServices,"))
return Assembly.LoadFile("Microsoft.AnalysisServices.dll");
return null;
}
Try adding a bindingRedirect to your web.config.