[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Jonathan Scott

8/29/2002 6:04:00 PM

What are the References in VS . Net useful for? I followed an example with
adding the microsoft.data.odbc.dll to this, but I still had to use a <%@
CompilerOptions='/R:"C:\Program
Files\Microsoft.NET\Odbc.Net\Microsoft.data.odbc.dll"' %> directive in order
for VS .Net to build my application successfully. Shouldn't the Reference
taken care of this?

--

Regards,

Jonathan Scott
Web Architect
Miniature Precision Components, Inc.
847 Walworth Street
Walworth, WI 53184
(262) 275 - 5791 x 2258


2 Answers

(Hussein Abuthuraya(MSFT))

8/29/2002 11:42:00 PM

0

Jonathan,

ASP.NET uses the Machine.config file to find it’s assemblies and not the references in VS. The reference is good when writting code so that you just import the
namespace and you don't have to qualify all the object names.

So you need to modify your Machine.config file to include the path for the ODBC .NET Provider. Here is the section of the Machine.config file that would need to be
modified:

<compilation debug="false" explicit="true" defaultLanguage="vb">

<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=1.0.3300.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" warningLevel="1"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=1.0.3300.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"/>
<compiler language="js;jscript;javascript" extension=".js" type="Microsoft.JScript.JScriptCodeProvider, Microsoft.JScript, Version=7.0.3300.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>
</compilers>

<assemblies>
<add assembly="mscorlib"/>
<add assembly="System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add assembly="System.Web, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<add assembly="System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add assembly="System.Web.Services, Version=1.0.3300.0,_Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<add assembly="System.Xml, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add assembly="System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<add assembly="System.EnterpriseServices, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<add assembly="Microsoft.Data.Odbc, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> ' This is the line that we need to add
<add assembly="*"/>
</assemblies>

</compilation>


I hope that helps!



Thanks,
Hussein Abuthuraya
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.co....


Jonathan Scott

8/30/2002 2:37:00 PM

0

That helps a lot Hussein, thank you. I'll try this out today! Wish I knew as
much about all this as you do... would make things a lot easier! *8) Just
curious, but where would you even find out that information about the
Machine.config, if we didn't have someone like yourself out here in the
newsgroups helping us?

--

Regards,

Jonathan Scott
Web Architect
Miniature Precision Components, Inc.
847 Walworth Street
Walworth, WI 53184
(262) 275 - 5791 x 2258
"Hussein Abuthuraya(MSFT)" <HussAbOnline@microsoft.com> wrote in message
news:xo5$rT6TCHA.2936@cpmsftngxa10...
> Jonathan,
>
> ASP.NET uses the Machine.config file to find it's assemblies and not the
references in VS. The reference is good when writting code so that you just
import the
> namespace and you don't have to qualify all the object names.
>
> So you need to modify your Machine.config file to include the path for the
ODBC .NET Provider. Here is the section of the Machine.config file that
would need to be
> modified:
>
> <compilation debug="false" explicit="true" defaultLanguage="vb">
>
> <compilers>
> <compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=1.0.3300.0,
Culture=neutral,
> PublicKeyToken=b77a5c561934e089" warningLevel="1"/>
> <compiler language="vb;vbs;visualbasic;vbscript"
extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System,
Version=1.0.3300.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089"/>
> <compiler language="js;jscript;javascript" extension=".js"
type="Microsoft.JScript.JScriptCodeProvider, Microsoft.JScript,
Version=7.0.3300.0, Culture=neutral,
> PublicKeyToken=b03f5f7f11d50a3a"/>
> </compilers>
>
> <assemblies>
> <add assembly="mscorlib"/>
> <add assembly="System, Version=1.0.3300.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
> <add assembly="System.Web, Version=1.0.3300.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
> <add assembly="System.Data, Version=1.0.3300.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
> <add assembly="System.Web.Services,
Version=1.0.3300.0,_Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
> <add assembly="System.Xml, Version=1.0.3300.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
> <add assembly="System.Drawing, Version=1.0.3300.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
> <add assembly="System.EnterpriseServices,
Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
> <add assembly="Microsoft.Data.Odbc, Version=1.0.3300.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/> ' This is the line
that we need to add
> <add assembly="*"/>
> </assemblies>
>
> </compilation>
>
>
> I hope that helps!
>
>
>
> Thanks,
> Hussein Abuthuraya
> Microsoft Developer Support
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.co....
>
>