I am coding a tool in C# with Visual Studio 2015 that queries a webserver and need authentification against a IBM webseal. Therefor I read in the internet it is possible to do the authentification with a HttpBaseProtocolFilter. But I cannot use it in my program as there is an error. "The Type- or namespacename 'HttpBaseProtocolFilter' was not found (missing using or assembly directive?)"
The documentation under https://learn.microsoft.com/en-us/uwp/api/windows.web.http.filters.httpbaseprotocolfilter says
Namespace: Windows.Web.Http.Filters
Assemblies: Windows.Web.Http.Filters.dll, Windows.dll
But I cannot find it in the IDE under - (hope I translated it correctly).
Hope you got a hint where to look for it.
Related
In my current UWP application, I am receiving 19062 errors, all of which begin with "The .winmd file (filename) contains type (type name) outside its root namespace (namespace name)." Examples of the full error code are shown below.
I have attempted the following to resolve the error:
Restarting Visual Studio
Rebuilding the Solution
Reinstalling the most recent version of the Windows SDK
Restarting my computer
The project was building fine a few days ago. Since then, I have not done anything to my computer which would result in such an issue with my solution.
Here are the error code examples:
"The .winmd file 'Windows.Foundation.UniversalApiContract.winmd' contains type 'Windows.ApplicationModel.Search.ISearchQueryLinguisticDetails' outside its root namespace 'Windows.Foundation.UniversalApiContract'. Make sure that all public types appear under a common root namespace that matches the output file name."
"The .winmd file 'Windows.Foundation.UniversalApiContract.winmd' contains type 'Windows.Graphics.Display.DisplayInformation'. The use of the Windows namespace is reserved."
"The .winmd file 'Windows.Foundation.UniversalApiContract.winmd' contains type 'Windows.UI.Xaml.Automation.IValuePatternIdentifiers' outside its root namespace 'Windows.Foundation.UniversalApiContract'. Make sure that all public types appear under a common root namespace that matches the output file name."
I am relatively new to UWP, and am failing to interpret the error. Any help would be much appreciated. Thanks in advance for any help.
Jordan.
The project needed to be cleaned to avoid these errors. OP confirmed in comments that it was a cause.
I wanted to make a use of Mono on Ubuntu 14.04.3 LTS in order to write some client-server app using C# language.
I followed this tutorial and installed everything Mono needs to be compiling and running C# .NET apps on Ubuntu.
Then I installed MonoDevelop 5.9.6 according to this tutorial which was actually installing three packages: monodevelop, l monodevelop-nunit, monodevelop-versioncontrol (I skipped database package as I don't need it for now).
I created simple console application in MonoDevelop and now I am trying to use some code which referencen to System.Net.Sockets (and other) system library class. I added to my project's references the System.Net.dll, which is located under usr/lib/mono/4.5 after Mono installation.
Apparently I cannot compile my app as I get the errors like:
Error CS0234: The type or namespace name `Sockets' does not exist in the namespace `System.Net'. Are you missing an assembly reference? (CS0234) (Communicator.Presentation)
I completely cannot get what is going on here. I've searched through net and forums and cannot find the answer for that issue.
I am also providing the screenshot from my PC with MonoDevelop opened where you can see that System.Net reference is added to the project, but the inside classes are not visible. When I type "System.Net." it only allows me to choose "System.Net.IPEndPointCollection" and nothing else:
EDIT:
What is also weird it that if i double-click on that System.net reference in MonoDevelop in the "Assembly Browser" windows I can see the contents of this "System.net.dll" and especially System.Net.Sockets is present there...:
You don't need System.Net.dll to be included, as you are looking for System.Net.Sockets namespace which exists inside System.dll. So you need to add reference to System.dll. See this link for more details.
So you need following reference:
using System;
I am also attaching my Ubuntu with MonoDevelop snapshots. In these snapshots, you can see that I don't have any reference to System.Net.dll, inside my project references, just System.dll is needed.
Hope this helps.
I'm attempting to use the following command line command to compile an assembly of the code from my project:
C:/"Program Files"/Unity/Editor/Data/Mono/bin/gmcs
-target:library -out:C:/Users/Austin/Desktop/PixelExpanse.dll
-recurse:C:/Users/Austin/Desktop/Projects/Repos/trunk/PixelExpanse/SpaceColonyRefactor/Assets/Source/*.cs
-d:RUNTIME -r:C:/"Program Files"/Unity/Editor/Data/Managed/UnityEngine.dll
As you can see, I am, I believe, correctly referencing the UnityEngine.dll.
The code that would be compiled contains references to UnityEngine.UI and UnityEngine.EventSystems. But when I run the above command, I get the following compile error:
error CS0234: The type or namespace name 'EventSystems' does not exist in the namespace 'UnityEngine'. Are you missing an assembly reference?
From what I have been able to find through googling, it SEEMS like an error people were getting when using a pre-4.6 assembly, because thats when EventSystems and UI were both introduced. But I don't know how I could be missing that in the dll I'm referencing as Unity 5 is the only version that has ever touched this computer.
As a side note, I have posted this question to Unity Answers and have yet to receive a response. I expect it's because assembly compilation is beyond the scope of what most users there choose to undertake. Hence my asking it here.
The namespace UnityEngine.EventSystems actually appears in UnityEngine.UI.dll and not UnityEngine.dll so it seems you need to reference the former too when compiling manually from the command-line. Unity projects have this by default (see below).
This is verified by opening up the assembly in your reflector tool of choice, here I am using JetBrains dotPeek:
This is how my test project appears with default Unity references. Note that by default a reference to UnityEngine.UI already appears in the Unity-created project:
When I built my Windnows desktop app via Unity, the above dlls appeared in:
<drive>:<projectOutFolder>\<projectName>_Data\Managed
You can try:
right click on "project panel", and after "Reimport All".
It's can be happen due to switch between platforms, e.g. IOS, or Desktop.. thus, folrders are deleted by became unecessary..
Solve for me: Unity 5.2, Win 7, 32bits;
Good luck!
I checked the UnityEngine.dll and the Eventsystems/UI namespace is not included. Despite, there is a dll in Unity5\Editor\Data\UnityExtensions\Unity\GUISystem\UnityEngine.UI.dll which includes these namespaces.
For mac, it's /Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll.
I've installed MSDeploy on my machine. I am using Visual Studio 2010 and C#. Trying to load 'Microsoft.Web.*' to code some sexy msdeploy functionality. Perhaps I'm a level 3 tard (highly probable) but the documentation for getting this absolutely blow as#.
The error I get is:
"The type or namespace name 'Web' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)"
So -- of course I try to load it via References, but it aint there. I then Google like a mf for "webdeploy api C#" and the such and cannot for the love of the giant spaghetti monster find anything on how to install / download the msdeploy ("microsoft.web.*) .dlls, apis.
Anyone can point a brother to a link?
I did download and install "WebDeploymentSetup.msi", but nope. I did install "webdeploy_en.msi" but nope. Then I found this craaaazy thing called "AzurePack.exe" -- didn't even try to install that. But, will if someone says that's it.
Thanks.
The Microsoft.Web.Deployment.dll can be found here:
c:\Program Files\IIS\Microsoft Web Deploy V3\Microsoft.Web.Deployment.dll
Point a reference to that.
The only prerequisite is installing WebDeploy v3.0:
http://www.iis.net/downloads/microsoft/web-deploy
I've downloaded the IKVM sources (http://www.ikvm.net/) from http://sourceforge.net/cvs/?group_id=69637
Now I'm trying to get it to build in Visual Studio 2008 and am stuck. Does anyone know of documentation of how to build the thing, or could even give me pointers?
I've tried opening the ikvm8.sln, which opens all the projects, but trying to build the solution leads to a bunch of "type or namespace could not be found" errors.
As you can probably guess I'm no Visual Studio expert, but rather am used to working with Java in Eclipse.
So again, I'm looking for either: step-by-step instructions or a link to documentation on how to build IKVM in Visual Studio.
Let me know if you need any more info. Thanks for any help!
Edit: I've also tried a manual "MsBuild.exe IKVM8.sln", but also get a bunch of:
JniInterface.cs(30,12): error CS0234: The type or namespace name 'Internal' does not exist in the namespace 'IKVM' (a
re you missing an assembly reference?)
JniInterface.cs(175,38): error CS0246: The type or namespace name 'ClassLoaderWrapper' could not be found (are you mi
ssing a using directive or an assembly reference?)
JniInterface.cs(175,13): error CS0246: The type or namespace name 'ClassLoaderWrapper' could not be found (are you mi
ssing a using directive or an assembly reference?)
Edit #2: I noticed a "ikvm.build" file so I downloaded and ran nant on the folder, which got me a step further. A few things start to build successfully, unfortunately I now get the following error:
ikvm-native-win32:
[mkdir] Creating directory 'C:\Documents and Settings\...\My Documents\ikvm\ikvm\native\Release'.
[cl] Compiling 2 files to 'C:\Documents and Settings\...\My Documents\ikvm\ikvm\native\Release'.
BUILD FAILED
C:\Documents and Settings\...\My Documents\ikvm\ikvm\native\native.build(17,10):
'cl' failed to start.
The system cannot find the file specified
Total time: 0.2 seconds.
Edit #3: OK solved that by putting cl.exe in the path, still getting other errors though. Note this is all for building it on the console e.g. with Nant. Is there no way to get it to build in Visual Studio? That would be sad...
Edit #4: Next step was installing GNU classpath 0.95, and now it looks like I need a specific OpenJDK installation... Linux AMD64?!
[exec] javac: file not found: ..\..\openjdk6-b12\control\build\linux-amd64\gensrc\com\sun\accessibility\internal\resources\accessibility.java
[exec] Usage: javac <options> <source files>
[exec] use -help for a list of possible options
Edit #5: Got an answer from the author. See below or at http://weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf Let's see if it works...
Edit #6 As I feared, next problem: "cannot open windows.h", see separate question here.
Final Edit: Found Solution! After getting the Platform SDK folders in the Lib and Path environment variables, the solution I described below worked for me.
I don't know that this would do it for you but can you try building from the command line?
msbuild ________
I think that's how I built the application due to the same issues.
OK just got the following reply from the author: http://weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf
If you want to build from cvs, you're on your own. However, you can more easily build from source if you use an official release.
If you download ikvm-0.36.0.11.zip, classpath-0.95-stripped.zip and openjdk-b13-stripped.zip from SourceForge (the last two are under the ikvm 0.36.0.5 release) you have all the sources that are needed.
Now you'll have to open a Visual Studio 2008 Command Prompt (i.e. one that has cl.exe and peverify in the path).
Then in the ikvm root directory, do a "nant clean" followed by "nant". That should build the whole project. After you done that, you should be able to build in Visual Studio (debug target only), but you may need to repair the assembly references in the projects (unless you have ikvm installed in c:\ikvm).
Regards,
Jeroen
Edit: After making sure the Platform SDK folders were in the Path and Lib environment variables, this worked for me. Thanks, Jeroen!
This is how I built IKVM 8.1.5717.0 from source. Visual Studio is not required.
Create a folder:
c:\ikvm\
Add the above folder to PATH (e.g. set PATH=%PATH%;c:\ikvm and leave command prompt open for later).
Download:
ikvmsrc-8.1.5717.0.zip (http://www.frijters.net/ikvmsrc-8.1.5717.0.zip)
Unzip and place "ikvm-8.1.5717.0" folder in c:\ikvm\
Download:
openjdk-8u45-b14-stripped.zip (http://www.frijters.net/openjdk-8u45-b14-stripped.zip)
Unzip and place "openjdk-8u45-b14" folder in c:\ikvm\
Download:
Java 8 SDK (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
Install and make sure location is added to path
Download:
NAnt 0.92 (https://sourceforge.net/projects/nant/files/nant/0.92/nant-0.92-bin.zip/download)
Unzip and place "nant-0.92" folder in c:\ikvm\
ICSharpCode.SharpZipLib.dll (http://www.icsharpcode.net/opensource/sharpziplib/Download.aspx)
Place "ICSharpCode.SharpZipLib.dll" in C:\ikvm\ikvm-8.1.5717.0\bin\
Open the following file in a text editor and change the version number:
C:\ikvm\ikvm-8.1.5717.0\CommonAssemblyInfo.cs.in
Using command prompt from earlier, cd to:
C:\ikvm\ikvm-8.1.5717.0\ikvm\
Run:
..\nant-0.92\bin\NAnt.exe
If successful all the binaries will be in:
C:\ikvm\ikvm-8.1.5717.0\bin