'File' is an ambiguous reference between 'ASPNETMaker2024.Entities.File' and 'System.IO.File'

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
crash
User
Posts: 177

'File' is an ambiguous reference between 'ASPNETMaker2024.Entities.File' and 'System.IO.File'

Post by crash »

I'm getting a new error on script generation, build fails.
Have cleared folder, regenerated, removed all tables, shut down but stills fails to generate.

It seems this has happened since recent temple update

\ASPNETMaker2024\Test\Models\aspnetfn.cs(4799,73): error CS0104: 'File' is an ambiguous reference between 'ASPNETMaker2024.Entities.File' and 'System.IO.File'

Any help please.


MichaelG
User
Posts: 1171

Post by MichaelG »

Rename your "File" table (say to "MyFile") in the database and sync the project.


crash
User
Posts: 177

Post by crash »

I don’t have a table called file and no field called file..
Thanks


MichaelG
User
Posts: 1171

Post by MichaelG »

You probably have a table called "Files". You can also try to add an entry in C:\Users\<user>\AppData\Roaming\ASPNETMaker2024\src\keyword.xml:

<keyword lang="ASPNETMaker" value="File"/>


w.saeed
User
Posts: 10

Post by w.saeed »

the reason is "File" object has two references the first one is 'ASPNETMaker2024.Entities.File' and the scond one is 'System.IO.File' ratherfor, your app ambiguous to chose which one of them as refernce

so go to globale use driver and spacify which package that you want to use.

global using GLOBALS =ASPNETMaker2024.Entities.File;


Post Reply