none
SmartStore.NET Building Errors RRS feed

  • Question

  • What Those Errors Mean

    Build FAILED.

           "Desktop\SmartStoreNET-4.x\SmartStoreNET.proj" (Deploy tar
           get) (1) ->
           "Desktop\SmartStoreNET-4.x\src\SmartStoreNET.sln" (Build t
           arget) (2:2) ->
           "Desktop\SmartStoreNET-4.x\src\Libraries\SmartStore.Servic
           es\SmartStore.Services.csproj" (default target) (7:38) ->
           "Desktop\SmartStoreNET-4.x\src\Libraries\SmartStore.Data\S
           martStore.Data.csproj" (default target) (8:25) ->
           (CoreCompile target) ->
             Setup\MigrateDatabaseInitializer.cs(105,20): error CS8121: An expressi
           on of type TConfig cannot be handled by a pattern of type MigrationsConf
           iguration. [Desktop\SmartStoreNET-4.x\src\Libraries\SmartS
           tore.Data\SmartStore.Data.csproj]
             Setup\MigrateDatabaseInitializer.cs(105,69): error CS8121: An expressi
           on of type TContext cannot be handled by a pattern of type SmartObjectCo
           ntext. [Desktop\SmartStoreNET-4.x\src\Libraries\SmartStore
           .Data\SmartStore.Data.csproj]
             Setup\MigrateDatabaseInitializer.cs(109,7): error CS0165: Use of unass
           igned local variable 'coreConfig' [Desktop\SmartStoreNET-4
           .x\src\Libraries\SmartStore.Data\SmartStore.Data.csproj]
             Setup\MigrateDatabaseInitializer.cs(109,31): error CS0165: Use of unas
           signed local variable 'ctx' [Desktop\SmartStoreNET-4.x\src
           \Libraries\SmartStore.Data\SmartStore.Data.csproj]
             Utilities\DataMigrator.cs(917,67): error CS0246: The type or namespace
            name 'T' could not be found (are you missing a using directive or an as
           sembly reference?) [Desktop\SmartStoreNET-4.x\src\Librarie
           s\SmartStore.Data\SmartStore.Data.csproj]
             Utilities\DataMigrator.cs(917,44): error CS1750: A value of type 'T' c
           annot be used as a default parameter because there are no standard conve
           rsions to type 'T' [Desktop\SmartStoreNET-4.x\src\Librarie
           s\SmartStore.Data\SmartStore.Data.csproj]
             Setup\SeedData\InvariantSeedData.cs(13790,10): error CS8121: An expres
           sion of type T cannot be handled by a pattern of type Category. [C:\User
           s\Abdo\Desktop\SmartStoreNET-4.x\src\Libraries\SmartStore.Data\SmartStor
           e.Data.csproj]
             Setup\SeedData\InvariantSeedData.cs(13793,10): error CS8121: An expres
           sion of type T cannot be handled by a pattern of type Manufacturer. [C:\
           Users\Abdo\Desktop\SmartStoreNET-4.x\src\Libraries\SmartStore.Data\Smart
           Store.Data.csproj]
             Setup\SeedData\InvariantSeedData.cs(13796,10): error CS8121: An expres
           sion of type T cannot be handled by a pattern of type Product. [C:\Users
           \Abdo\Desktop\SmartStoreNET-4.x\src\Libraries\SmartStore.Data\SmartStore
           .Data.csproj]
             Setup\SeedData\InvariantSeedData.cs(13799,10): error CS8121: An expres
           sion of type T cannot be handled by a pattern of type BlogPost. [C:\User
           s\Abdo\Desktop\SmartStoreNET-4.x\src\Libraries\SmartStore.Data\SmartStor
           e.Data.csproj]
             Setup\SeedData\InvariantSeedData.cs(13803,10): error CS8121: An expres
           sion of type T cannot be handled by a pattern of type NewsItem. [C:\User
           s\Abdo\Desktop\SmartStoreNET-4.x\src\Libraries\SmartStore.Data\SmartStor
           e.Data.csproj]
             Setup\SeedData\InvariantSeedData.cs(13807,10): error CS8121: An expres
           sion of type T cannot be handled by a pattern of type Topic. [C:\Users\A
           bdo\Desktop\SmartStoreNET-4.x\src\Libraries\SmartStore.Data\SmartStore.D
           ata.csproj]


    Monday, September 30, 2019 3:35 AM

All replies

  • Hi friend,

    Welcome to MSDN forum.

    What VS version do you install in your machine? And what method do you run the build?

    1. Please try click the ClickToBuild.cmd in solution folder to automatically build the projects in your machine. There's some requirements for the successful build, you need to make sure you've installed Asp.net and web development workload . And it could be better if you've installed Visual C++ Redistributable, see the system requirements.

    If you have VS2017 installed,  install Asp.net and web development and DeskTop development with C++ workload, then the build should succeed when you run the ClickToBuild.cmd.

    2. As for the error message you got, CS8121 indicates the code you want to build uses C#7.1, so I suggest you need to install VS2017 or above to compile and build it. See similar issue here.

    For VS2015, I can't find the C#7.1 option in project properties. See:

    

    Hope info above helps. Any update feel free to let me know.

    Best Regards

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, October 1, 2019 12:36 PM
  • Hi friend,

    Any update for this issue? If the issue still blocks you, please feel free to let me know. And if ,my answer is helpful to resolve your issue, please consider marking it as answer so that we can archive it for you.

    Looking forward to your reply!

    Best Regards

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, October 4, 2019 10:07 AM