web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Unable to execute stat...
Finance forum

Unable to execute static method main when type parameter is not specified. Parameter name: type

(0) ShareShare
ReportReport
Posted on by 972

Hi 

      I have two local VM. First one is V7.3 PU23. I have a project use button to run class. and this project works well in this VM. However, I export this project and import to the second VM(V8.1 PU23). This project shows error. I debug this project, but the system even does not run my code.

0876.28.png2043.27.png

I have the same question (0)
  • Verified answer
    Mea_ Profile Picture
    60,286 on at

    Hi JustZM ,

    Export and Import is not enough, you need to compile your code as well. So did you compile it after import?

  • Jie G Profile Picture
    Microsoft Employee on at

    Hi JustZM,

    Have you right clicked the runnable class "JC_ButtonCreateNewBOL" and set it as the Startup Object in VS?

    Are there any build errors?

    What can you see if you click "Show diagnostic information"?

  • JustZM Profile Picture
    972 on at

    Hi ievgen Miroshnikov

          Thank you very much, your answer solve my problem. But I have an additional question. After I import a project, I only compile my own model, or my model + referenced packages, or All models?

    Best Regards,

    JustZM

  • Verified answer
    Mea_ Profile Picture
    60,286 on at

    You need to compile only new objects. SO if you import 2 models you have to compile 2, you don't need to compile neither standard code nor stuff compiled before. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans