Mono: System.ServiceModel missing from /usr/lib/mono - c#

Anyone know why I might be missing this assembly?
It doesn't seem to be anywhere in the filesystem. I'm running Debian wheezy.
I'm trying to set up a build environment, I first installed mono-xbuild with APT then mono-complete after my build reported it couldn't resolve System.ServiceModel.
And yes, the csproj does reference System.ServiceModel.
Many thanks

There is a package for this assembly. Depending on your Mono/ NET Version configuration:
https://packages.debian.org/de/wheezy/libmono-system-servicemodel4.0-cil
I could not find a version below 4.0. This may be the only version existing (If I remember correctly, there should be nothing for 2.0 because the support of mono was dropped)

Related

System assemblies not found for .Net v3.5 when starting new project or trying to open existing one

when I'm trying to open existing project that targets .Net 3.5 or create a new one that targets it, Visual Studio can't find some .Net Framework assemblies:
As you can see, System, System.Data, System.Drawing, System.Runtime.Serialization and System.Xml are not found.
The errors that I'm getting upon build look something like
Warning MSB3267 The primary reference "System", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.5".
To resolve this problem, either remove the reference "System" or retarget your application to a framework version which contains "System".
If I retarget the project to something like .Net v4.5 then all assemblies are found but I need it to build with v3.5 as a target.
What I've tried to fix the issue:
1) I made sure that .Net3.5 is enabled in Windows Features:
2) I made sure 3.5 dev tools are installed in Visual Studio:
3) I've tried to manually install .Net v3.5 from the microsoft installation file
None of these steps helped so far. I've tried to search for these missing dlls manually and found them in various subfolders of C:\Windows\Microsoft.NET\Framework, mostly in C:\Windows\Microsoft.NET\Framework\v2.0.50727.
What's the correct way to fix this? How do I point VS to the assemblies? Is there something wrong with my setup?
Software versions:
Visual Studio Community 2019 v16.53, Windows 10 Pro with some fresh updates
After asking around, I've been told that it's an old and known bug in msbuild that has quite a few possible workarounds: https://github.com/microsoft/msbuild/issues/1333
I personally went with a custom FrameworkPathOverride: https://github.com/microsoft/msbuild/issues/1333#issuecomment-296346352, e.d. I've added this XML snipped to my .csproj that worked like a charm:
<PropertyGroup>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client</FrameworkPathOverride>
</PropertyGroup>
After that, unload/load project and I was good to go.

SAP HANA connectivity from .Net Core application

What I'm trying to do:
Connecting HANA db from .Net Core application. (Windows environment)
What I did:
Downloaded and installed HANA Client for windows. Installed using "hdbinst.exe" from the folder "hdb_client_windows_x86_64" I got it.
Created a NuGet package for the file - "Sap.Data.Hana.Core.v2.1.dll" from the path: C:\Program Files\sap\hdbclient\dotnetcore\v2.1
Installed this file in to my sample .Net Core 2.1 project thru NuGet package manager.
What I'm experiencing:
Warning 1 -->
Warning NU1701. Package 'SAP.HANADBClient.NetCore 2.1.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.1'. This package may not be fully compatible with your project.
Warning 2 --> Warning MSB3270. There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Users\XXXXX.nuget\packages\sap.hanadbclient.netcore\2.1.0\lib\Sap.Data.Hana.Core.v2.1.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
Similar case for .Net Core 2.2 project
What I looked around:
I did a search in the web and saw few members had already shared this kind of issue (.Net core with HANA integration). But saw this post saying that the issue got resolved. But was it good? not sure.
Even this post says HANA supports .Net Core.
Did search in the web, but could not find the solution.
What I'm looking for:
Why am I getting these two warnings?
Will it give any issues later on - (prod runtime..)
Particularly - 2nd warning - why it's looking for "Processor architecture", and how to resolve this.
Can I request any one of you to help me out on this effort.
Please let me know still additional details are needed.
Thanks in advance.
To narrow down the issue, try adding the Sap.Data.Hana.Core.v2.1.dll library to your .NET Core 2.1 project directly (not through NuGet) and see if you get the compilation warnings.
If you don't get the warnings, then it's likely your NuGet package that's causing the issue.
If so, how did you create your package? If you created it using the SDK-style, check the TargetFramework to make sure it's set to the correct TFM or TxM as described here.
Also, according to this answer make sure you are using the correct version of the DLL, either x86 or x64.

Xamarin Forms Portable Application MonoAndroid Build Error - Framework not found

I've made a fresh Xamarin Forms Portable Project from the Cross Platform templates in Visual Studio 2015. Haven't touched or modified any of the project files. Then When I try to initially build it, I get the following build error:
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1098,5): error MSB3644: The reference assemblies for framework "MonoAndroid,Version=v6.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
My Project defaults are:
Looking at similar questions, it would seem that, indeed, that version of the framework is not installed. But it seems to be. Android SDK Manager shows the following:
What is going on here? How can I resolve this.
When you get these type of errors, that are really 'out there' and hint of system configuration problems, it's time to reinstall.
I had to completely remove all remnants of Visual Studio, SDKs and Xamarin. 'Modify' and 'Repair' didn't work.
After the complete fresh install of VS 2015 and Xamarin, things are back to normal.

Sandcastle Error BE0073 .NET Framework 4.5

I am trying to generate help files using Sandcastle, locally this works find but on my build server I keep receiving the same error message:
SHFB: Error BE0073: A project with a different or higher framework version was
found but that version (.NETFramework 4.5) or a suitable redirected version
was not found
I have checked and I have .NET 4.5.1 installed and 4.5, my projects build without an issue on the server. It is only Sandcastle that is causing a problem.
Does anyone know the cause of this error or how I can diagnose it further?
For some reason the directory:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5
Was missing on my build server. I copied it from my local machine and everything started to work.
I was experiencing the same issue trying to configure VSTS.
SHFB: Error BE0071: Unable to locate information for the project framework version '.NET Framework 4.6.1' or a suitable redirected version on this system. See error number help topic for details.
The LastBuild.log showed that it was not finding the .NETFramework folder.
Finding tools...
The Sandcastle tools are located in 'd:\a\1\s\packages\EWSoftware.SHFB.2017.1.28.0\Tools\'
The SHFBROOT system environment variable was not found. This variable is usually created during installation and may require a reboot. It has been defined temporarily for this process as: SHFBROOT=d:\a\1\s\packages\EWSoftware.SHFB.2017.1.28.0\Tools\
Locating components in the following folder(s):
d:\a\1\s\Documentation\Project.Docs
C:\ProgramData\EWSoftware\Sandcastle Help File Builder\Components and Plug-Ins\
d:\a\1\s\packages\EWSoftware.SHFB.2017.1.28.0\Tools\
Last step completed in 00:00:00.0360
I ended up setting the Project-specific components path in the project properties to point to the SHFB .NET Framework package and this solved the problem.
For me this message occurred after I had installed the Sandcastle Help File Builder application on our build server, but the build logs were complaining that the SHFBROOT environment variable wasn't found, but I had configured an override in the Help File Builder project which the build log said it would use instead.
<PropertyGroup>
<!-- NOTE: Update the version number in the path (YYYY.M.D.R) to match the package version -->
<SHFBROOT Condition=" '$(SHFBROOT)' == '' ">$(MSBuildThisFileDirectory)\..\packages\EWSoftware.SHFB.2017.1.28.0\tools\</SHFBROOT>
</PropertyGroup>
The above setting didn't help me on the build server however and it was still failing (but not locally).
What did work for my case was a reboot of our build server.
A fairly obvious oversight on my part, as I expect this is somewhere in the help documentation that I may have initially missed.
I had this related issue with running it on the build server:
BE0071: Unable to locate information for the project framework version 'XXXX'
Cause
The build engine was unable to locate framework information for the version specified in the project's FrameworkVersion property. An attempt was made to redirect usage to a later version but none were found.
Solution
This can happen if you select a framework that is not installed on the system. For example, choosing an earlier version of the Silverlight framework. If the earlier version is not found, the build engine will attempt to redirect usage to a later version of the framework if one can be found on the system. If the specified version or a later version cannot be found, you will need to install the selected or later version of the framework specified in the project on the system.
The framework assemblies are searched for in the Reference Assemblies folder (%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework). If you have not installed a version of Visual Studio related to the indicated framework version or the related targeting pack, the reference assemblies may not exist there. The simplest solution is to download and install the appropriate targeting pack or copy the reference assemblies from another system that does have them.
If using the Sandcastle Help File Builder NuGet package, it may mean that you need to install one or more of the help file builder Reflection Data Set packages which contain the necessary files. If multiple versions of the platform package exist, install the latest release as it will cover all prior releases as well. Be sure to set the project's Component Path project property to the packages folder if it is not under the help file build project folder. Once installed and the component path is set, you may need to close and reopen the project in order for it to detect the newly installed files.

Targeted my project in Visual 2010 to .Net 4.0 but the system still looks for the dll 'System.Core version 2.0.5.0'

My project targets .Net 4.0 Client profile but it crashes as soon as it starts by displaying a file load exception stating that System.Core version= 2.0.5.0 . How can I change that?
Edit: Forgot to add, it's a WPF project.
This is mainly for future me, who will at some point come back to this question, and none of the current answers will solve your problem (hey future me!)
My issue was a nuget package referencing System.Core 2.0.5.0 so I had no control over the reference.
To get System.Core 2.0.5.0 installed on the machine, which already had .NET 4.0 installed and patched, I installed the Portable Class Library.
To install the Portable Class Library tools on a build machine without installing Visual Studio 2012, download the Portable Library Tools, and save the download file (PortableLibraryTools.exe) on your computer. Run the installation program from a Command Prompt window, and include the /buildmachine switch on the command line.
I had a problem similar to this that only occurred on windows XP/Server 2003 while Windows 7/Server 2008 and later worked fine. After a long time of looking I ran into this article:
http://code.google.com/p/autofac/wiki/FrequentlyAskedQuestions
It suggested downloading the following hotfix
http://support.microsoft.com/kb/2468871
After installing that everything worked fine! Maybe give that a try and see if it helps.
Probably you included reference to some libraries belonging to .Net 2.0 and they depends on System.Core 2.0. So you need to check every reference's version number included in your project.
Make sure that System.Core in References targets version 4. Also, make sure Specific Version is false. You could also try to remove the reference to System.Core and then add it again.
Open the references section in solution explorer, delete the System.Core
Right click on the References and add a new one, locate System.Core v4.0 and add that one.
I was able to fix a similar error by installing Framework 4.0 UPDATE kb2468871
Direct link: http://www.microsoft.com/en-us/download/details.aspx?id=3556
Info Link: http://support.microsoft.com/kb/2468871

Categories

Resources