We've been battling with a strange issue for a couple of days now. Have searched the net for answers but none seem to solve the error.
Our scenario is: our organization has a Silverlight 5 application, which was developed in VS 2010, and everything was working fine. It is actually running in our production servers.Recently we migrated our development machines to VS 2015, and the machines themselves (new ones for the dept). The OS is Windows 7, same as before.
At first we were welcomed with that nasty MatchTimeoutInMilliseconds error, due to the MS Framework. Eventually MS released the 4.6.2 Preview version which covered this issue.
Ok. So back to implementing the changes requested, we created a new method in our webservice, and it complied just fine. We do have the [OperationContract] and [DataContract] tags in place. There is a question posted and answered with the justification that these tags were missing.However, when we go to the SL app and update the WS reference, we get this "Custom tool error: Failed to generate code for the service reference ..."
Custom Tool Warning messages include
"Cannot import wsdl:binding..."
"Cannot import wsdl:port..."
"Cannot import wsdl:portType..."
"No endpoints compatible with Silverlight 5 were found. The generated client class will not be usable unless endpoint information is provided via the constructor."
We're puzzled, because then we thought we might have done something wrong, so we rolled back the changes, and updated the service reference with no changes, and we get the same error. The Referece.cs file is generated with no code, and all references to the webservice are no longer recognized by the compiler.
We've also read some posts that offer as a solution unchecking "Reuse types in referenced assemblies". Doing that does clear these errors, only to generate others, since our app was built on this premise.
We've also tried deleting the service reference and adding it back again, but to no avail.
Eventually we reverted the SL app to the point it was compiling, which was before updating the webservice reference, republished the WS with the new method, and manually added the new method to the Reference.cs file, tested it and it works.
This, however, should not be -the- solution. It's a hassle and prone to errors.
We'd appreciate any help in solving this matter, or an insight as to why this is happening.
thanks
The whole problem is that, for some reason I still haven't found, VS fails to generate the code for Reference.cs.
As a workaround, we've managed to generate the Reference.cs file by using the SlSvcUtil.exe tool, located (on my machine) at "c:\Program Files (x86)\Microsoft SDKs\Silverlight\v5.0\Tools".
In order to get the same code as the one generated before the migration, I've used the following command and options:
SlSvcUtil.exe my_ws_address /namespace:"*,my_class_namespace" /ct:System.Collections.ObjectModel.ObservableCollection`1 /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v5.0\System.Windows.dll" /edb /ser:Auto
I didn't use the /out switch, but rather ran the command on my desired output directory. But you might want to look into that switch before running the command.
Related
I have a problem running my 1-click application. It stopped working with an error code "Application validation did not succeed". The problem is related to Mono.Cecil.dll and related signature validation.
If I turn publish status of Mono.Cecil.dll to exclude in VisualStudio/Properties/Publish/Application files the app starts working ok for majority of users, but some users report errors with certain functionalities.
Any idea what could be the issue? I took over some legacy code so I am not sure why this dll was included in the code. Previusly it was working ok with this dll and I did not modify it.
Errors:
System.Deployment.Application.InvalidDeploymentException
(SignatureValidation) Strong name signature not valid for this
assembly Mono.Cecil.dll
Copied from the comment.
You have to be very careful about what libraries/packages are being referenced by your project, as they can bring harms to your end users if coming from certain sources.
Mono.Cecil, as a famous open source library, has been known to have tons of sources and only its NuGet package or its source code repo on GitHub can be trusted as they are managed by the original author.
The issue disappeared once you resolved that mysterious reference, but you can check out other references to make sure similar things won't happen in the future.
MSBuild bin log can reveal almost everything about the build, so you might start from there.
I have not touched my Azure functions in several months. I came back yesterday and made changes which I then pushed to Github. The CI integration failed to build my changes however, because of the error below:
CSC : error CS1703: Multiple assemblies with equivalent identity have been imported: 'D:\home\site\repository\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll' and 'D:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Xml.ReaderWriter.dll'. Remove one of the duplicate references. [D:\home\site\repository\DataModel\DataModel.csproj]
It seems like maybe this library now exists on the server by default now, so there's a conflict when it tries to load it again via Nuget. The problem is, we obviously still need to reference the Nuget package in the project for our development machines to download it.
However, if this were the case, it seems like it would be a very common scenario but I found no other reports of this in the context of Azure Functions. So, I'm wondering if it's related to a recent change, or there's a unique situation afoot.
UPDATE:
Unfortunately, never understood or resolved the error or issue. The workaround was not reasonable, but I only had one big function app, so did it and it's over now. If you have many function apps with this error, I'm sorry.
The workaround was to follow the advice of #david-ebbo and effectively recreate my entire Function App. I also had to fully recreate all my shared class libraries including my test projects because of new compatibility issues. Overall, the new paradigm here is really looking good, and I attribute the excessive pain of this situation to working with multiple new and disruptive techs at the same time. Azure Functions + Visual studio + a .NET revolution. It took me about 3 hours to go and convert all my function.json files to method annotations, and move classes around, and then recreate the whole structure. It as very frustrating with a lot of trial and error, and I'm effectively still limited to only using .NET standard class libraries, which is an issue with a workaround for me.
#david-ebbo , please comment on my new issue if you don't mind.
Azure Function CI Build Error - Cannot create a file when that file already exists
I am using MediaInfoDotNet library which internally called C++ MediaInfo.dll.
This has been running on PROD fine for a while. However suddenly this morning it started throwing below error:
Unable to find an entry point named 'MediaInfo_New' in DLL 'MediaInfo.dll'
No publish has been made to PROD, so as far as I am concerned nothing changes there.
Just for a context this is an ASP.Net Nancy app running on Azure AppService.
Now few hours later, after unable to find any explanation we just restarted the server and the problem go away.
Anyone has idea why and how it happened? I can't afford to have this kind of errors happening on PROD again.
You should try to get ride of outdated "DotNet" thing, and use MediaInfo library directly, there is a C# binding.
Download the "DLL without installer" package, it contains a C# project file.
https://mediaarea.net/fr/MediaInfo/Download/Windows
For a project I am working on, I need to solve a mathematical model. I chose to do this using Microsoft.Solver.Foundation and the SolverFoundation.Plugin.LpSolve plugin. Both associated .dll files for these extension seem to work fine, as VS2015 recognizes and references them without a problem and compiles and runs my program without errors.
This is however up untill I try to actually solve my optimization, which needs "lpsolve55.dll" to work. I have downloaded this dll and put it in my project's bin/Debug folder, but for some kind of reason VS2015 just doesn't recognize it. I.e.
I can't reference it by simply browsing to it from my "Add Reference" tab.
It's impossible to (un-)register it via the regsvr32 cmd-prompt application, as it doesn't have any DLL (Un-)registry entry points.
The TlbImp.exe cmd-prompt application can't handle it.
So basically, after discovering the above (after trying the most-common internet solutions), I still feel quite dissatisfied to get the error message while I try to solve the optimization -
Unable to load DLL 'lpsolve55.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
The wierd part is also that I have another project in which I solve a similar problem, where there are absolutely no problems at all using lpsolve55.dll....
Some quick facts:
I reference .NET framwork 4.5.2. I have changed it to 4.5 as well as 4.0, but this didn't change anyting.
For as far as I can tell, the bin/debug folder of my projects are identical.
I am working on a fully updated windows 10 OS, 64 bits, while using visual studio 2015.
My question would thus be whether or not some of you have encountered a similar problem and if you were able to solve it in some way.
Highly appreciated!
After some careful analysis, I have found the answer to the problem. To be honest, as most things are, it was quite simple in the end. The lpsolve55.dll wasn't recognized because I didn't have my new bin-folder in the Path, which I did have with my old project. I simply forgot.
On a further note however, after the lpsolve55.dll directory was added to the path, I still got an error telling me there was no model to be found that could solve my directive. Since the error occured when I was calling the LPSolverDirective(), some research landed me on the following page:
http://lpsolve.sourceforge.net/5.5/MSF.htm
Above page gives a complete and stable way of how to acces lpsolve55.dll using the LPSolverPlugin straight out of Microsoft.Solver.Foundation.dll. After following the method in the link that involves editing my projects' bin/Debug and bin/Release folders, I got the LP model up and running within no-time.
Morale of the story - read the documentation. I am a bit of a beginner in programming entire multi-project solutions and using customly-added dlls, but hopefully this helps someone else experiencing the same. In the end, I learned a lot by simply trying different methods of getting it to work, so no time was wasted.
I'm currently developing an app on our companies portal and yesterday started noticing that I wasn't able to reference external classes or methods from references.
My colleague put the solution on his computer and committed his code with all the references working fine, and I opened up his code and the references have stopped working and still can't be found.
I have deleted the website cache and other user options but had no luck so far.
One reference file is an external VB class file and the other was simply calling "request" from Web.UI.UserControls. (I got around this by using HttpContext.Current.Request.QueryString , even though "Request" worked on my colleagues computer)
Is there any options on my Visual Studio that would make the same code break compared to his? I contemplated a reinstall but it's a lot of time wasted and the problem may surface again.
Edit. I'm on Visual Studio 2013 Ultimate
You can enable assembly binding log, and use fuslogvw.exe to see what is going on behind the scenes. It will allow you to know more details on the error and think in possible solutions.
http://msdn.microsoft.com/en-us/library/e74a18c4(v=VS.100).aspx