WebDeploy API for .NET - c#

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

Related

IntelliSense complains about missing Microsoft.AspNetCore packages despite being there

In my Blazor application, on the client side, IntelliSense complains about a lot of Microsoft.AspNetCore packages although the project compiles and runs fine.
I get a lot of things like
The type or namespace name 'Mvc' does not exist in the namespace 'Microsoft.AspNetCore' (are you missing an assembly reference?)
The type or namespace name 'Razor' does not exist in the namespace 'Microsoft.AspNetCore' (are you missing an assembly reference?)
...
Things like
#inject HttpClient Http
are also underlined with red squigglies.
The project builds and runs perfectly.
What is wrong here?
Followup 1
Because I was asked for all versions:
Visual Studio 2019, 16.0.2
Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview4-19216-03
In my project:
Id Versions ProjectName
-- -------- -----------
Microsoft.AspNetCore.Blazor.Build {3.0.0-preview4-19216-03} MyBlazorApp.Client
Microsoft.AspNetCore.Blazor {3.0.0-preview4-19216-03} MyBlazorApp.Client
NETStandard.Library {2.0.3} MyBlazorApp.Client
You need Visual Studio Preview version 16.1 or higher to work with 3.0.0-preview4 Blazor.
If that alone doesn't help, verify that you dont have any .cshtml files in your client project - they all have a .razor extension since 3.0.0-preview4. The presence of .cshtml file triggers a different SDK's behavior, requiring AspNetCore.Mvc namespace. Though Microsoft guys see it as a bug and probably will fix it.
https://github.com/aspnet/AspNetCore/issues/9640
Shut down VS
Delete the .vs folder or the .suo file
Restart VS
uninstalling x86 version of .NET Core 3.0 Preview SDK
https://dotnet.microsoft.com/download/dotnet-core/3.0
Then installing the x64 again on Windows10 64bit fixed that issue for me

Can't add reference to HttpBaseProtocolFilter

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.

C# and MonoDevelop on Ubuntu - missing system libraries contents

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.

Reference to IQStreamable not found

I am new to StreamInSight development. I have downloaded few samples and now I am trying to compile them. I am getting error as "The type or namespace name 'IQStreamable' could not be found (are you missing a using directive or an assembly reference?)" I have already included below references into my project -
Microsoft.ComplexEventProcessing
System
System.Reactive.Core
System.Reactive.Interfaces
System.Reactive.Linq
System.Reactive.PlatformServices
System.Reactive.Providers
Please let me know if I am missing anything.
You need to make sure that the version of StreamInsight you downloaded and installed is v2.1. The IQStreamable interface is new in v2.1. Once you have confirmed that you have the correct version of StreamInsight or installed the correct version, you'll need to make sure you have the appropriate namespace and assembly included with your project. IQStreamable is in the Microsoft.ComplexEventProcessing.Linq namespace and the Microsoft.ComplexEventProcessing.dll. It also would not hurt to make sure that you are running the most recent version of Rx.

How to get IKVM to build in Visual Studio 2008?

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

Categories