why namespace gray out after upgrade (.net standard to net core 8.0 )revit 2025 (revit api c#)

why namespace gray out after upgrade (.net standard to net core 8.0 )revit 2025 (revit api c#)

ammukrishnan2206
Explorer Explorer
873 Views
3 Replies
Message 1 of 4

why namespace gray out after upgrade (.net standard to net core 8.0 )revit 2025 (revit api c#)

ammukrishnan2206
Explorer
Explorer

i have installed nuget package but still shows error why
Severity Code Description Project File Line Suppression State Details
Error (active) CS0246 The type or namespace name 'FirebaseAuth' could not be found (are you missing a using directive or an assembly reference?)
Severity Code Description Project File Line Suppression State Details
Error (active) CS0246 The type or namespace name 'JavaScriptSerializer' could not be found (are you missing a using directive or an assembly reference?) 

0 Likes
874 Views
3 Replies
Replies (3)
Message 2 of 4

ricaun
Advisor
Advisor

Usually grays means the using can be deleted, is not been use in the file.

 


@ammukrishnan2206 wrote:

i have installed nuget package but still shows error why


Could be a lot of things, but probably you didn't install correctly or the package does not support in net core.

 


@ammukrishnan2206 wrote:

Error (active) CS0246 The type or namespace name 'JavaScriptSerializer' could not be found (are you missing a using directive or an assembly reference?) 


JavaScriptSerializer does not exist in net core, you need to use a different Json serialize, that class is inside the file System.Web.Extensions.dll and namespace System.Web.Script.Serialization and that namespace does not exist, that's the reason of the red zigzag line.

ricaun_1-1717427868260.png

 

Here is quote from the system.web.script.serialization.javascriptserializer.

"For .NET Framework 4.7.2 and later versions, use the APIs in the System.Text.Json namespace for serialization and deserialization. For earlier versions of .NET Framework, use Newtonsoft.Json."

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

Message 3 of 4

ammukrishnan2206
Explorer
Explorer

Thanks @ricaun 

 

which nuget package to use for firebaselink,firebaseconfig(.net core8.0) and package version

0 Likes
Message 4 of 4

ricaun
Advisor
Advisor

Firebase is kinda off the Revit API topic, but I have tested on the past the firebase-authentication-dotnet package inside Revit, works fine but never used inside a project.

 

Here is the link: https://github.com/step-up-labs/firebase-authentication-dotnet

 

I suggest to create a new project or clear and make work without any firebase dependency.

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes