Include dll in C# from commandline - c#

I am using the following code to send automatic mails: http://www.independentsoft.com/webdavex/tutorial/sendmessage.html
However I am getting error CS0246 on the Independentsoft commands.
I have done the following:
Copied Independentsoft.Webdav.Exchange.dll file in the same folder
Used the command to generate the tlb file
regasm.exe Independentsoft.Webdav.Exchange.dll /tlb:Independentsoft.Webdav.Exchange.tlb
The output :
Types registered successfully
Assembly exported to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Independents
oft.Webdav.Exchange.tlb', and the type library was registered successfully
I am still getting the CS0246 error:
protocoltest.cs(3,7): error CS0246: The type or namespace name 'Independentsoft' could not be found (are you missing a using directive or an assembly reference?)
protocoltest.cs(4,7): error CS0246: The type or namespace name 'Independentsoft' could not be found (are you missing a using directive or an assembly reference?)
So I tried this:
csc protocoltest.cs /r:Independentsoft.Webdav.Exchange.dll
Compilation is done...!
I am now getting error while running:
System.Net.WebException: The remote server returned an error: (440) Login Timeout.
at System.Net.HttpWebRequest.GetResponse()
at Independentsoft.Webdav.Exchange.Resource.a(String A_0, PropertyName[] A_1)
at Independentsoft.Webdav.Exchange.Resource.d(String A_0)
at Independentsoft.Webdav.Exchange.Resource.get_Mailbox()
at Independentsoft.Webdav.Exchange.Resource.SendMessage(Message message)
at Sample.Program.Main(String[] args)_
Can you advise? I do not have Visual Studio.

Related

Compiler Error Message: CS0234: The type or namespace name 'WebApp' does not exist in the namespace 'Fax' (are you missing an assembly reference?)

I am facing the error, while accessing RightFax SDK on IIS through the browser. I need to access Right Fax SDK API through IIS:
Compiler Error Message: CS0234: The type or namespace name 'WebApp'
does not exist in the namespace 'Fax' (are you missing an assembly
reference?)
Source Error:
Line 27: using System.Web.WebPages; Line 28: using
System.Web.WebPages.Html; Line 29: using Fax.WebApp; Line 30:
using Fax.WebApp.languages; Line 31: using System.Web.Mvc;
Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary
ASP.NET
Files\rightfaxsdk_api\0e7addb8\6d101f6a\App_Web_index.cshtml.f774d6f8.pdiaoqvl.0.cs
Line: 29
You can find that dll on the server where you installed the Web SDK in IIS. Copy the dll to your solution and add it as a reference in your project. You also need the proper ‘using’ statement too...

gRPC build error using Visual Studio 2019 C#

I make my project based on this tutorial:
https://learn.microsoft.com/en-us/aspnet/core/tutorials/grpc/grpc-start?view=aspnetcore-3.1&tabs=visual-studio
It told me that it is missing directive or an assembly reference.
But I instal the related plugin, and the code generate successfully, I don't know why VS still can't find the code...
Here is the code content, the namespace is exist:
More info my proto properties:
Error Msg:
1>MainWindow.xaml.cs(6,7,6,23): error CS0246: The type or namespace
name 'HeartBeatMessage' could not be found (are you missing a using
directive or an assembly reference?)
1>MainWindow.xaml.cs(16,24,16,40): error CS0246: The type or namespace
name 'HeartBeatService' could not be found (are you missing a using
directive or an assembly reference?)
I found this question because I was running into this problem too. See: https://github.com/grpc/grpc/issues/20402
For now, I have manually moved the generated .cs files into my project and disabled the build step on the .proto (otherwise VS will complain about double definitions).

error CS0246: The type or namespace name 'JwtTokenViewModel' could not be found (are you missing a using directive or an assembly reference?)

I am using asp.net core web application with Visual Studio 2015. I have added a reference project and implemented the method which is working fine.
Here is the screen shots
Now I have removed the dependency from project.json and deleted the project.lock.json file. I have completely removed the reference.
When I completely remove the reference I am still able to use UserViewModel and Go to definition opens the file in metadata. But I cannot use the JwtTokenViewModel.
The error details
error CS0246: The type or namespace name 'JwtTokenViewModel' could not be found (are you missing a using directive or an assembly reference?)
I did some research and found that we get cs0246 error is due to reference problem. I have followed the solution of some link but not a solution
Why am I getting error CS0246: The type or namespace name could not be found?
How can I resolve this issue. Please anyone let me know.

The type or namespace name could not be found. SeleniumBasicAuthWrapper

I have created unit test project in VS12 and installed package 'SeleniumBasicAuthWrapper' from NuGet.
When I add
using SeleniumBasicAuth;
and try to build project I get following error message:
Error 2 The type or namespace name 'SeleniumBasicAuth' could not be
found (are you missing a using directive or an assembly reference?)

GtkSourceView and Mono, c# - example not working, lack of documentation

I tried to compile a example from Mono website:
http://docs.go-mono.com/?link=T%3aGtkSourceView.SourceView
I tried to use this command:
mcs -pkg:gtk-sharp-2.0,gtksourceview2-sharp task3.cs
I've got a errors:
task3.cs(17,3): error CS0246: The type or namespace name SourceLanguagesManager' could not be found. Are you missing an assembly reference?
task3.cs(20,29): error CS0841: A local variablemanager' cannot be used before it is declared
task3.cs(24,10): error CS1061: Type GtkSourceView.SourceBuffer' does not contain a definition forHighlight' and no extension method Highlight' of typeGtkSourceView.SourceBuffer' could be found. Are you missing an assembly reference?
How to compile this example on Ubuntu 14.04 LTS?

Categories