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
Related
Premise
I have a Visual Studio 2015 solution containing different VC++ projects.
Some of them (EXE and some DLLs) have the $OutDir set to default "$(SolutionDir)$(Configuration)\" (i.e. "C:\MySolution\Debug\").
For some other projects (DLLs), I need to change the output path to a sub-directory of the "default" $OutDir (i.e. "C:\MySolution\Debug\Pieces\".
Example directory tree:
C:\MySolution\Debug\
MyProgram.exe
Dependency.dll
.\Pieces\
MyPiece1.dll
MyPiece2.dll
Constraints
the "Pieces" DLLs depends on a third-party Dependency.dll (through NuGet package), which I cannot modify.
Usual solution
The usual way for this is to change the $OutDir project setting for "pieces" projects, but this will also force their dependencies to be output in the same sub-dir.
This is not wanted and also created problems in debugging and packaging of the entire solution.
What I tried so far
I tried to:
1. keep the $OutDir the same for all projects
2. change the "pieces" $TargetName to "Pieces\$(ProjectName)"
This seems to work (both MyPiece*.dlland Dependency.dll are correctly placed and debugging is fine), but unfortunately Visual Studio generates the following warning:
warning MSB8012: TargetName(Pieces\MyPiece1.dll) does not match the Linker's OutputFile property value (MyPiece1). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
This warning is somewhat confusing, because the %Link.OutputFile in the project settings looks correct:
$(OutDir)$(TargetName)$(TargetExt) => C:\MySolution\Debug\Pieces\MyPiece1.dll
Question
What is the correct approach to solve my problem?
How do I force Visual Studio to output some of the generated files in a different path, but still having their Nuget dependencies in the "default" $OutDir?
I've searched the web and StackOverflow already, but I can't find a suitable answer.
Note: my problem is not related to upgrading a pre-VS2010 solution (as in Microsoft official notes on warning MSB8012 after solution upgrade and asked on StackOverflow).
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.
The question is how to resolve conflicts between versions of assemblies in my project that was upgraded to MVC4 and EF5?
The problem is manifest in the fact that my controllers and models can include System.Data.Objects, but now my views.
I am using MVC 4, my project was upgraded from MVC 3.
Entity Framework is version 5.
I have a controller that is able to use objectcontext from System.Data.Objects.
My Usings:
using System.Data.Objects;
using System.Data.Entity;
When I try to include the using in the view form System.Data.Objects, I get :
CS0234: The type or namespace name 'Objects' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
I am targeting .net 4.5
My Build Displays this message:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1561,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly.
You can build your solution in diagnostic mode to get more detailed information about the error.
Open the VS Options dialog (Tools > Options), navigate to the "Projects and Solutions" node and select "Build and Run". Change the MS Build project build output verbosity to Diagnostic.
Have a look here.
If you look at the build message, it states the 4.0 version of the .net framework is referenced... Is there a setting in your project file or web/app.config specifying a conflicting version of the .net framework?
Are you familiar with fuslog? you can set it up to log all assembly bindings that .net is doing while running your application. You should then be able to see detailed information on what is getting bound when. If you still can't figure it out, you can always do a binding redirect on that .dll in the web.config.
http://msdn.microsoft.com/en-us/library/eftw1fys.aspx -- binding redirects
http://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.71).aspx -- fusion log viewer
Set up fusion logger and take a look at what the output is. If you don't get an answer from that, try the binding redirect (which would give you at least a temporary solution).
In the directory I was publishing to, there was a folder named aspnet_client. I moved it (instead of deleting it), republished, and it worked. I'm not sure why that folder decided to give me trouble out of the blue.
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.
D:\Web\CityV2\App_Code\ActiveRecord.tt(0,0) : error CS0006: Compiling transformation: Metadata file 'MySql.Data' could not be found
Let me start by saying I'm using VWD 2008 Express.
These are the steps I've taken so far:
Created an entirely new project
Added references for Subsonic.Core.dll and MySql.Data.dll
Copied Active Record templates to project
Changed all <## include file="SQLServer.ttinclude" #> to <## include file="MySQL.ttinclude" #>
Copied the MySQL.ttinclude and Settings.ttinclude from the TemplateProviders folder
Updated Settings.ttinclude with my connectionstring and database information
Updated the Settings.ttinclude and created the external tool mapping as per ranomore's instructions
Attempted to build the code from the templates and received the error
I then realized that I didn't have MySql Connector "installed" on my dev box (even though I added a reference to the bin). So I proceeded to MySQL.com and downloaded the latest 6.0.4 connector msi and installed it (GAC). The error no longer appears, but neither does anything else: no new classes, no new errors, nothing [and yes, I refreshed the project after running the command ;-)].
Two things:
Am I missing a step somewhere?
Is there a way build the templates without needing MySQL installed to the GAC?
Unfortunately SubSonic 3 doesn't support VWD 2008 Express (or more specifically VWD doesn't support t4). There is a sort of workaround that ranomore came up with but it will require some work by you. See the following question for more details:
SubSonic ASP.NET MVC sample in Visual Web Developer Express
EDIT: I should have read your question properly you obviously already have the link above. Maybe worth your while downloading the trial of VS professional and seeing if you have more luck with that to see if it's worth outlaying the cash to buy it.
On a side note if you're looking to get an msdn subscription for free you should have a look into registering for the bizspark program