I am using Visual Studio.NET MSDN Enterprise Edition Final
Release.
I created a custom component DLL class using
LicFileLicenseProvider, and also created the proper .LIC
file. Everything works fine.
However, when I try to include a liceses.licx file in my
WinForm app to compile the DLL license into the exe I get
error LC0003: Unable to resolve
type 'ClerkAssist.Server.Connection,
ClerkAssist.Server.Connection'
Apprantely ClerkAssist.Server.Connection is the complete
name of the custom class in DLL which is also referenced
in my WinForm project.
What can I do to resolve this problem?
Thanks,
Akhilesh Agarwal
ok, it took awhile to repro. Could you try out the following to see if it
works for you? If it does not, then we are probably working on the same
error but a different problem. I also generated a licensed class. In my
windows form application, my licenses.licx file contained the following line
ClassLibrary1.LicensedClass,LicensedClass
when I tried to compile, I got the same error as you described below. here
is the weird thing. I edited my licenses.licx file to contain the
following
ClassLibrary1.LicensedClass
rebuilt the solution, then it compiled fine.
I added the original line
ClassLibrary1.LicensedClass,LicensedClass
rebuilt, it still compiled fine.
I deleted the licenses.licx file, readded the line
ClassLibrary1.LicensedClass,LicensedClass and it still compiled fine. It
is only with a new windows form application can I repro the situation.
Could you try the above as weird as it is and write back with your results?
An alternative would be to create a new windows form application, add
licenses.licx file with just
ClassLibrary1.LicensedClass
then try to recompile as well. That seemed to work the first time.
Thanks!
Mike Wong
Microsoft Developer Support
This posting is provided “AS IS” with no warranties, and confers no rights.
Thank you for your reply to my problem. I tried the steps given by you
in a new solution. I created a ClassLibrary project and a
WindowsApplication project in the test solution. After setting up all
the licensing code in the ClassLibrary and WindowsApplication, I put
the following line in licenses.licx
ClassLibrary1.LicensedClass, LicensedClass
Compiling the above gives me the error:
Could not transform licenses.licx into a binary resource. (1): error
LC0003: Unable to resolve type 'ClassLibrary1.LicensedClass,
LicensedClass'
I then edited licenses.licx to contain only
ClassLibrary1.LicensedClass
Do this gives a different build error:
Could not transform licenses.licx into a binary resource. (1): error
LC0004: Exception occured creating type
'System.ComponentModel.LicenseException'
I deleted licenses.licx and created it again with the line
ClassLibrary1.LicensedClass,LicensedClass
It gives the same error LC0003 as stated above.
If I delete licenses.licx file and build my project, I am able to
create an instance ClassLibrary1.LicensedClass in my
WindowsApplication. I have put ClassLibrary1.LicensedClass.lic file in
the same location where class library dll file is located.
So the only problem lies with compiling the license into the Windows
Executable.
I would be happy to zip this test solution project folder and attach
it along with my message in the newsgroup. Let me know if this will be
of help to you. Otherwise I can also e-mail it to your address.
Thanks!
Akhilesh Agarwal
Aditya International
http://www.adityainternational.com/it
ekim...@microsoft.com (Mike Wong (Microsoft)) wrote in message news:<LuIFwmEsBHA.1520@cpmsftngxa08>...
> --
thanks for trying out some things. Yes, please zip up what you have since
I did the same steps but with different results.
much appreciated,
Mike
--------------------
From: akhilesh...@msn.com (Akhilesh Agarwal)
Newsgroups: microsoft.public.dotnet.framework
Subject: Re: Licenses.licx problem with Final Release
Date: 8 Feb 2002 00:19:08 -0800
Organization: http://groups.google.com/
Lines: 88
Message-ID: <49645a00.02020...@posting.google.com>
References: <eb1501c1ac7c$69ec98c0$a5e62ecf@tkmsftngxa07>
<LuIFwmEsBHA.1520@cpmsftngxa08>
NNTP-Posting-Host: 203.122.61.30
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1013156349 609 127.0.0.1 (8 Feb 2002 08:19:09
GMT)
X-Complaints-To: groups...@google.com
NNTP-Posting-Date: 8 Feb 2002 08:19:09 GMT
Path:
cpmsftngxa08!cpmsftngxa07!tkmsftngp01!newsfeed00.sul.t-online.de!t-online.de
!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feeder.qis.net!sn-xit-02!su
pernews.com!postnews1.google.com!not-for-mail
Xref: cpmsftngxa08 microsoft.public.dotnet.framework:10682
X-Tomcat-NG: microsoft.public.dotnet.framework
could you try one more thing for me -
try to create a solution with just one project in it - a new windows forms
project.
Reference the classlibrary dll where the you put the
classlibrary1.licensedclass.lic file in. In my case it was the bin\debug
add the licx file with the contents
ClassLibrary1.LicensedClass, LicensedClass
Try to compile
next, edit the file so it just contains
ClassLibrary1.LicensedClass
try to compile again.
The important part is to reference the classlibrary dll where the
classlibrary1.licensedclass.lic exists.
If you have a solution that contains both the windows forms and the
classlibrary make sure the windows forms project is referencing the dll
where the classlibrary1.licensedclass.lic exists
My bin\debug foloder for classlibrary1 looks like
Classlibrary1.dll
ClassLibrary1.LicensedClass.lic
ClassLibrary1.pdb
I probably need to submit a bug on the above regardless because I haven't
seen the documentation where the licx file format has changed.
again, thanks for the willingness to experiment,
Mike
--------------------
From: akhilesh...@msn.com (Akhilesh Agarwal)
Newsgroups: microsoft.public.dotnet.framework
Subject: Re: Licenses.licx problem with Final Release
Date: 8 Feb 2002 00:19:08 -0800
Organization: http://groups.google.com/
Lines: 88
Message-ID: <49645a00.02020...@posting.google.com>
References: <eb1501c1ac7c$69ec98c0$a5e62ecf@tkmsftngxa07>
<LuIFwmEsBHA.1520@cpmsftngxa08>
NNTP-Posting-Host: 203.122.61.30
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1013156349 609 127.0.0.1 (8 Feb 2002 08:19:09
GMT)
X-Complaints-To: groups...@google.com
NNTP-Posting-Date: 8 Feb 2002 08:19:09 GMT
Path:
cpmsftngxa08!cpmsftngxa07!tkmsftngp01!newsfeed00.sul.t-online.de!t-online.de
!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feeder.qis.net!sn-xit-02!su
pernews.com!postnews1.google.com!not-for-mail
Xref: cpmsftngxa08 microsoft.public.dotnet.framework:10682
X-Tomcat-NG: microsoft.public.dotnet.framework
Hi Mike,
I have some good news this time, your suggestions worked!!!!!!!
I did follow the steps in this new e-mail of yours. I am giving the details
for the sake of other people who may encounter the same problem.
This time I created a solution with only one WindowsApplication project. I
referenced the ClassLibrary1 dll.
So far so good. The only thing is when I reference this dll file, it gets
copied to the bin folder of my WindowsApplication project. Therefore I also
copied the .lic file to the same directory (i.e. the bin folder)
I created licx file and compiled with ClassLibrary1.LicensedClass,
LicensedClass, it failed. Now I changed the licx file to contain only
ClassLibrary1.LicensedClass, and bingo!!! No errors. Just like you said.
After compiling I wanted to check if the License really got compiled into
the exe or not. So I deleted the .LIC file. And it still worked without a
LicenseException.
Further I now imported the ClassApplication into my new solution. I removed
the reference to ClassLibrary1 dll, and added a reference to ClassLibrary1
project. And it still continues to work without a problem.
So there are two wierd things.
a) If I create a solution with both ClassLibrary and WindowsApplication, it
will not complie the licenses.licx file, no matter what I do.
b) If I follow the steps mentioned above, I am able to compile without
errors, but only by modifying the licenses.licx syntax to an un-documented
syntax.
Thanks for all your help!!!!!
Akhilesh Agarwal
I just wanted to add to my previous posting that if you can figure out an
answer for the solution file I posted, it will also be great. Because it
won't work anyhow. The new solution works, but not the one which I attached
to the newsgroup.
Thanks again,
Akhilesh Agarwal
at least we have one workaround. I currently have a bug submitted with the
product group to see what they have to say. They are investigating it
right now. I will let you know what happens.
As a side note, I could get a solution with both projects to work only if I
referenced the dll where both the dll and the
classlibrary1.licensedclass.lic exist. If I referenced another dll that
was in the obj folder where the classlibrary1.licensedclass.lic did not
exist. I could not get it to work either.
I'll keep you updated.
much appreciated,
I am just checking to see if there is any update on the licenses.licx issue.
Is there any web site where we can download hotfixes for .NET Framework or
Visual Studio.NET
Thanks,
Akhilesh Agarwal
Aditya International
http://www.adityainternational.com/it
"Mike Wong (Microsoft)" <ekim...@microsoft.com> wrote in message
news:NzKZxcysBHA.2196@cpmsftngxa08...
the update on the issue was that the gotdotnet article was in error. The
format of the license file should just have
ClassLibrary1.LicensedClass
The program manager Mike Harsh updated the gotdotnet article.
As for hotfixes and service packs, I don't believe there is one site to go
to right now. When service packs get releases, there will be a link much
like there is for 6.0 visual studio.
Thanks,
Mike Wong
Microsoft Developer Support
This posting is provided “AS IS” with no warranties, and confers no rights.
(c) 2002 Microsoft Corporation. All rights reserved.
Thanks for your reply. Things work fine now with the updated information on
the syntax of License.licx file.
However, I still have one more issue, and I hope you can help me out on this
one too.
a) I created a Class Library with LicensedClass
b) I have no problem in using the LicensedClass from a Windows Application
project. Licenses.licx also compiles with no errors.
Now I have created a ASP.NET Application.
c) I reference the same ClassLibrary created above and use the
LicensedClass.
Issue 1
-------
Licenses.licx file gives a compile time error in ASP.NET application
"Could not transform licenses file 'licenses.licx' into a binary resource.
(1): error LC0004 : Exception occured creating type
'System.MissingMethodException'"
The LIC file is present in the bin folder of ASP.NET application which also
contains the ClassLibrary dll.
Issue 2
--------
If I run the ASP.NET application without Licenses.licx then I get a
LicenseException even though LIC file is present in the bin folder.
But all works well with a Windows Application.
Is there any special steps to follow incase of using a LicensedClass in
ASP.NET ? When I run the ASP.NET application, it copies the dll files in
C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET
Files\MyASPNETApplication folder
I believe this maybe causing a problem because LIC file is not automatically
copied to this temporary location.
Thanks for all your help.
I couldn't get it to work either only to find out that it is a known issue
(id#120624 for my reference). This bug is huge because it is blocking
developers using licensing with webapps. The PM is working on a workaround
that will hopefully be out soon. I will keep you updated.
Thanks!
Mike
--------------------
From: "Akhilesh Agarwal" <akhilesh...@msn.com>
References: <eFA9mo0xBHA.492@tkmsftngp02> <BAESleTyBHA.1532@cpmsftngxa09>
Subject: Re: Licenses.licx problem with Final Release
Date: Wed, 13 Mar 2002 19:03:09 +0530
Lines: 50
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <OZoOrOpyBHA.2248@tkmsftngp02>
Newsgroups: microsoft.public.dotnet.framework
NNTP-Posting-Host: 203.122.47.103
Path: cpmsftngxa09!tkmsftngp01!tkmsftngp02
Xref: cpmsftngxa09 microsoft.public.dotnet.framework:12975
X-Tomcat-NG: microsoft.public.dotnet.framework
Hi Mike,
Akhilesh Agarwal
Aditya International
http://www.adityainternational.com/it
Mike Wong