I just cloned the WebDAVSharp.SQLExample repo from winterleaf. It uses the WebDAVSharp.Server as base for a WebDAV Server which runs in a (MS)SQL backend, meaning all files/data is stored in DB.
I added the nu-get package of WebDAVSharp.Server to the WebDAVSharp.SQLExample project but still, it shows me missing references. For eg.: in the WebDAVSharp.Data->SqlStoreFileInfo.cs the base class WebDavFileInfoBase is missing. (The're over 200 further errors complaining about missing references)
What makes me curious is the fact I can't find this class in both repos, which basically means it doesnt exist (if I didnt simply overread something).
Does anyone have similiar troubles with WebDAVSharp.SQLExample or does it build without errors (missing references) for you ? If so, I would be very glad about a clue/hint what I am missing.
I recently noted that winterleaf created a pull request in WebDAVSharp.Server which integrated the missing files and assemblies.
So in order to successfully build the WebDAVSharp.SQLExample one need a development build of WebDAVSharp.Server which integrates this pull request.
That's it.
Related
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
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.
Googling this issue, I've tried all the answers to my problem with no change.
I have a small MVC e-commerce app I am building for my company. It is divided into two projects: Domain and WebUI. WebUI is obviously dependent on Domain and my build-order reflects this. I've checked target frameworks for both projects and they match (4.5) and I have EF 5.0 added.
After building the basic product presentation/catalog and cart code I want to implement users so I can build the order/store functions.
Everything is working fine until this point.
I run "Enable-Migrations" so I can write my own membership/user code and use the DB I have setup so future context changes target my DB instead of the defaultOCnnection.
Enable Migrations inserted the Migrations folder and Configuration class. Ran with no errors produced. "Checking if the context targets and exisiting database ... Code First Migrations enabled for project *.WebUI."
When I attempted a Build after running Enable-Migrations, I received a number of errors stating that The type or namespace 'Mvc' does not exist in the namespace 'System.Web' in the Domain project (my product class) and one error 'Could not resolve reference. Could not locate assembly "System.Web.Mvc, Version 4.0.0.0 ...." Check to make sure the assembly exists on the disk ..." And of course an error from WebUI that it could not locate the Domain.dll (because Domain.dll fails to build).
How did running enable-Migrations cause this?
How do I resolve this? The dll is on the disk, right where the properties say it is, Reference included, Local Copy=true ....
I'm really at a loss to figure this one out ....
Strangely, I encountered this error two days ago on one of our machines, the only difference being that we are running EF 6.1.1. I used ReSharper to check that nothing in our domain project was using System.Web.Mvc and I removed the reference. I couldn't figure out how it got there anyway.
We ran enable-migrations maybe a couple of years ago on this code base, so it would seem unlikely that our issue was caused by that.
For your part, there really shouldn't be much of a reason to have a reference to System.Web.Mvc in your domain code, so perhaps you could look at moving whatever code is depending on that DLL into your web project, if it can't be outright deleted, then remove the DLL reference itself?
I know this doesn't explain why it doesn't just work. That might have something to do with assembly redirects in the app.config file, perhaps. Maybe it's redirecting to v5, which isn't there?
After I build a few of my references, which are present in the project and accessible through intellisense before the build is performed.
Unfortunately none of my projects are set to target Client Profile, as answered in this thread.
The type or namespace name could not be found
This seems to be the most common cause, does anyone know what else other than this can cause the same issue?
Edit:
The Types that aren't found are all from the referenced DLLs. I have the correct using directives for these and they are present in the resource folder, however they become underlined red after a build (I did try cleaning to).
My initial thought was the framework (the project is on v3.5), but I checked all my resources working or otherwise all where on v2 bar a few (working ones) on v4 which I removed temporarily to make sure we're causing issues.
Unable to access the project from my current location but will post any requested specifics as soon as I can.
edit:
Resolved the issue by deleting all of the custom class libraries... found and rebuilt each of their projects then added the new DLLs back into the project. Stored libraries weren't very organised, so I probably have some confliction between old/new versions.
Have you read the warning in the error list? You might need to install nuget package used by the referenced projects
for me the error warning was
All projects referencing "project file" must install nuget package Microsoft.Bcl.Build.
Are the projects being built correctly ?
Sometimes, you need to manually generate them (right click on them, generate), before being able to run a full build.
I dont exactly know why, but this might be the way to go for you.
~A few simple things to try before getting into more complicated water...
Try clicking:
Build->Clean Solution
Build->Build Solution
If this doesn't work, check your using statements are all there and correct, check your references all still exist.
I had a similar issue today, and I thought I would mention it here in case it helps someone else out. In my case, I have a VB.net Class Library which is referenced by a C# class library. The solution would build fine, but in the IDE, as soon as I started editing a file in the C# project, I would get errors about not finding a reference to the VB.Net library. It turns out that the VB.Net class library had a reference to System.web (lowercase w). I'm not sure how that came about -- but the solution was to delete that reference and replace it with a reference to System.Web (uppercase W).
Make sure all the projects in your solution have the same "Target framework" value
I am writing a WPF client that consumes services from an ASP web service (VS2010, .net 4.0). It was working just fine until yesterday when I suddenly get the above compiler error. Double-clicking on the error takes me to Reference.cs and highlights just about anything along the lines of:
[System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=2)]
(The 'Runtime' object is highlighted as not being in the MyAppNameSpace).
I've tried googling this and re-adding the service reference and re-adding the assemby reference but nothing works and I'm completely stuck. Reference.cs is automatically generated and I'm still relatively new to VS2010 so I'm not sure where to go with this.
Hoping someone here can point me in the right direction...?
I had the same problem. After hours of trying to solve it I realised I had a class in my library called system. What a cock.
Your problem is that you had defined a "System" namespace somewhere that the compiler and Intellisense were finding before the real "System". The solution is to remove the offending namespace, then clean and rebuild the project.
I had the same issue with a VB project only I had no old code as it was a new service reference. I did not have any other namespace with System in the name. The solution for me was to make the following series of replacements:
VB
in Reference.vb
Replace System. with nothing
Then replace "Runtime.Serialization" with "System.Runtime.Serialization"
Lastly replace <Global.ComponentModel with <ComponentModel
C#
in Reference.cs (I didn't try this but expect it will work)
Replace System. with nothing
Then replace "Runtime.Serialization" with "System.Runtime.Serialization"
Lastly replace [Global.ComponentModel with [ComponentModel
One other detail that might lead someone to a root cause is that the service wsdl was coming from an old style asp.net web service (.asmx), here: https://api.mindbodyonline.com/0_5/ClassService.asmx?wsdl
Update
I've subsequently found that changing the target framework to 4.5.1 resolved my compilation issue. Also I had the root cause was that I had different framework versions targeted by my web project and the class library containing my service references. Once I changed them all to 4.5.1 everything was happy no changes to Reference.vb was needed.
Well, for the sake of anyone looking for an answer in future - I gave up trying to fix it and copied a backup of the project files over the existing ones and brought the changes since them in manually. That fixed the corrupt referencing issue.
I had a similar problem, but with a different solution.
My project used to be called "JobRunner", but it changed to "NGB.JobRunner". In the project settings however the default namespace and assembly name was still "JobRunner", and the Reference.cs file was being generated with this namespace.
I have no idea why it was causing problems, but when I fixed the default project namespace and assembly name, and re-added the service reference, problem solved!
I had the similar problem. It was the upper case 'T' in time which was causing the issue. I was doing RunTime but the correct was 'Runtime'.
What a time waste due to a typo!!